|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
uk.org.iscream.cms.conient.datacomponents.VisibleDataComponent
uk.org.iscream.cms.conient.datacomponents.StringDataComponent
This is the most basic of DataComponents. It simply displays the value as a String in a JTextField.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected String |
_attribute
The attribute that this component is concerned with |
protected String |
_cache
Remembers what the last value was, so we only update if we have to. |
protected int |
_displayLength
The length of the JTextField |
protected JTextField |
_item
Just a normal label to display our value as a String |
protected JLabel |
_label
The friendly label for this component |
protected String |
_name
The friendly name of this component |
protected int |
DEFAULT_TEXT_LENGTH
The default length of the JTextField |
String |
REVISION
The current CVS revision of this class |
Fields inherited from class javax.swing.JPanel |
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
StringDataComponent(String name,
String attribute)
Creates the component with a friendly name to be used as label |
Method Summary | |
String |
getPacketAttribute()
Returns the string showing the packet attribute that the component is looking after |
String |
getValue()
Returns the string showing the packet data that the component is looking after |
void |
run()
This run method updates any Swing components The setValue() method adds this component to the Swing Event Dispatching Queue to run this method. |
void |
setValue(XMLPacket packet)
This takes the packet to obtain the value from, it then performs all approriate conversions and adds this class to the Swing Event Dispatching queue. |
String |
toString()
Overrides the Object.toString()
method to provide clean logging (every class should have this). |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final String REVISION
protected final int DEFAULT_TEXT_LENGTH
protected String _name
protected String _attribute
protected JLabel _label
protected String _cache
protected int _displayLength
protected JTextField _item
Constructor Detail |
public StringDataComponent(String name, String attribute)
name
- the friendly nameattribute
- the data attribute we look afterMethod Detail |
public void run()
public String toString()
Object.toString()
method to provide clean logging (every class should have this).
public void setValue(XMLPacket packet) throws DataFormatException
packet
- the XMLPacket to get the data from
DataFormatException
- if there was a problem converting the data for displaypublic String getPacketAttribute()
public String getValue()
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |