jET
1.0alpha4


org.jet
Class PropertiesDialog.DialogControl

java.lang.Object
  |
  +--org.jet.PropertiesDialog.DialogControl
Enclosing class:
PropertiesDialog

public static class PropertiesDialog.DialogControl
extends java.lang.Object

This class is a control entity within dialog box. This is because there are many components in dialog box and this makes easier to manage them.

Components are distinguished by names.


Field Summary
 javax.swing.JComponent control
          Component stored in this dialog control.
 java.lang.String name
          The name of component.
 
Constructor Summary
PropertiesDialog.DialogControl(java.lang.String name, javax.swing.JComponent c)
          Constructs a dialog control with given name and component.
PropertiesDialog.DialogControl(java.lang.String name, javax.swing.JComponent c, boolean hasLabel)
          Constructs a dialog control with given name, component and label.
PropertiesDialog.DialogControl(java.lang.String name, javax.swing.JComponent c, boolean hasLabel, boolean enabled)
          Constructs a dialog control.
 
Method Summary
 javax.swing.JLabel createLabel()
          Extracts label associated with component.
 boolean getLabel()
          Gets the information about label requesting for this dialog control.
 void setEnabled(boolean b)
          This method stores in the component information at it is recomended to change enabled or disabled in future.
 void setLabel(boolean b)
          Sets the information about label requesting.
 java.lang.String toString()
          Returns text with the name of thid dialog control and class name of component.
 boolean wasEnabled()
          Retrives information about component with
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The name of component. This is also a key in map.


control

public javax.swing.JComponent control
Component stored in this dialog control.

Constructor Detail

PropertiesDialog.DialogControl

public PropertiesDialog.DialogControl(java.lang.String name,
                                      javax.swing.JComponent c)
Constructs a dialog control with given name and component. Dialog control has an associated label and it is initially enabled.

Parameters:
name - Name of a control.
c - A component.

PropertiesDialog.DialogControl

public PropertiesDialog.DialogControl(java.lang.String name,
                                      javax.swing.JComponent c,
                                      boolean hasLabel)
Constructs a dialog control with given name, component and label.

Parameters:
name - Name of control.
c - A component.
hasLabel - If set label is enabled with this control.

PropertiesDialog.DialogControl

public PropertiesDialog.DialogControl(java.lang.String name,
                                      javax.swing.JComponent c,
                                      boolean hasLabel,
                                      boolean enabled)
Constructs a dialog control.

Parameters:
name - Name of a dialog control.
c - A component.
hasLabel - If set the dialog control has label associated with component.
enabled - If unset the component won't be enabled or disabled in future in the dialog.
Method Detail

setEnabled

public void setEnabled(boolean b)
This method stores in the component information at it is recomended to change enabled or disabled in future.

Parameters:
b - If true the component shouldn't be enabling or disabling in future use.

wasEnabled

public boolean wasEnabled()
Retrives information about component with

Returns:
True if the

setLabel

public void setLabel(boolean b)
Sets the information about label requesting.

Parameters:
b - If true, the component must have an associated label.

getLabel

public boolean getLabel()
Gets the information about label requesting for this dialog control.

Returns:
true if control has an associated label.

createLabel

public javax.swing.JLabel createLabel()
Extracts label associated with component.

Returns:
A label with localized text or null when this dialog control hasn't got a label.

toString

public java.lang.String toString()
Returns text with the name of thid dialog control and class name of component.

Overrides:
toString in class java.lang.Object
Returns:
Text representation of this class.

jET
1.0alpha4