org.openrdf.sesame.config.ui.util
Class Util

java.lang.Object
  extended byorg.openrdf.sesame.config.ui.util.Util

public class Util
extends Object

Utility class for Configure Sesame!

Version:
$Revision: 1.3.4.2 $
Author:
Peter van 't Hof

Constructor Summary
Util()
           
 
Method Summary
static JLabel createLabel(Icon image)
          Creates a new borderded JLabel with the supplied image
static JTextArea createReadOnlyTextArea(String text, Color background)
          Creates a new 'read-only' JTextArea with the supplied text and background color.
static JTextArea createTitle(String text, Color background)
          Creates a new 'titled' JTextArea with the supplied text and background color
static Window getOwner(Component aComponent)
           
static void showWarningDialog(Component parent, String warning, String title)
          Brings up a dialog that displays the given warning
static int showYesNoDialog(Component parent, String message, String title)
          Brings up a dialog with the options 'Yes' and 'No'
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

createReadOnlyTextArea

public static JTextArea createReadOnlyTextArea(String text,
                                               Color background)
Creates a new 'read-only' JTextArea with the supplied text and background color. 'read-only' means that the text area cannot be edited and its carret is deinstalled.

Parameters:
text - Text
background - Background color
Returns:
A new 'read-only' JTextArea

createTitle

public static JTextArea createTitle(String text,
                                    Color background)
Creates a new 'titled' JTextArea with the supplied text and background color

Parameters:
text - Text
background - Background color
Returns:
A new 'titled' JTextArea

createLabel

public static JLabel createLabel(Icon image)
Creates a new borderded JLabel with the supplied image

Parameters:
image - Image
Returns:
A new bordered JLabel

showWarningDialog

public static void showWarningDialog(Component parent,
                                     String warning,
                                     String title)
Brings up a dialog that displays the given warning

Parameters:
parent - Component to display the dialog in
warning - Warning to display
title - Title for the dialog

showYesNoDialog

public static int showYesNoDialog(Component parent,
                                  String message,
                                  String title)
Brings up a dialog with the options 'Yes' and 'No'

Parameters:
parent - Component to display the dialog in
message - Message to display
title - Title for the dialog
Returns:
Option selected by the user

getOwner

public static Window getOwner(Component aComponent)
See Also:
SwingUtilities.windowForComponent(java.awt.Component)


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.