|
|||||||||
| 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
verinec.gui.configurator.nodeeditor.EditorPanel
verinec.gui.configurator.nodeeditor.EditFieldsPanel
public class EditFieldsPanel
A panel to hold editor fields.
The editors for different network components create their fields and use display... functions for common fields. The concept can be summarized as follows:
EditorTextField, EditorMultiTextField or
EditorComboBox) to add to the NodeEditor
| Nested Class Summary | |
|---|---|
class |
EditFieldsPanel.NameChangeListener
A listener to add to all fields that contain names for panels. |
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private EditorPanel |
fieldPanel
|
private EditorPanel |
labelPanel
|
protected static int |
length
Uniform length for TextFields. |
private TitledBorder |
tborder
|
protected Element |
xml
Every panel has an according XML structure. |
| 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.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 | |
|---|---|
EditFieldsPanel(Element xml,
NodeEditor nodeEditor)
Creates the panel and initiates the necessary areas and layouts. |
|
| Method Summary | |
|---|---|
void |
addField(EditorComboBox f)
Add a field into the editor. |
void |
addField(EditorTextField f)
Add a field into the editor. |
protected static void |
displayPartHWAddress(Element baseElement,
EditFieldsPanel parentPanel,
NodeEditor nodeEditor)
Add an editor field for the hw address. |
protected static void |
displayPartName(Element baseElement,
EditFieldsPanel parentPanel,
NodeEditor nodeEditor)
Add an editor field for a name. |
protected static void |
displayPartNw(Element baseElement,
EditFieldsPanel parentPanel,
NodeEditor nodeEditor)
Add the fields for nw configuration. |
String |
getNameForPanel()
Function which tries to find a most meaningful name for a Panel. |
private static Element |
getOrCreateChild(Element baseElement,
String childName)
Get the child of an element or create it if not yet existing. |
Element |
getXml()
Get the xml element defining this panel. |
void |
updateTitledBorder()
If a name field changes, the border has to be updated accordingly. |
| Methods inherited from class verinec.gui.configurator.nodeeditor.EditorPanel |
|---|
actionPerformed, createResetButtons, discard, discardRed, save, update |
| 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 |
|---|
protected static final int length
protected Element xml
private EditorPanel labelPanel
private EditorPanel fieldPanel
private TitledBorder tborder
| Constructor Detail |
|---|
public EditFieldsPanel(Element xml,
NodeEditor nodeEditor)
xml - The configuration to hold in member variable.nodeEditor - Reference to the main editor.| Method Detail |
|---|
public void addField(EditorTextField f)
f - The field to add.public void addField(EditorComboBox f)
f - The field to add.public void updateTitledBorder()
EditorTextField which has the
EditorTextField.containsNameForPanel field set to true.
public String getNameForPanel()
public Element getXml()
private static Element getOrCreateChild(Element baseElement,
String childName)
baseElement - The xml element to operate on.childName - The name of the child to get.
protected static void displayPartNw(Element baseElement,
EditFieldsPanel parentPanel,
NodeEditor nodeEditor)
baseElement - The element which contains all the XML information.parentPanel - Panel the fields should be child of.nodeEditor - Reference to the instance of the first EditorPanel, the NodeEditor.
protected static void displayPartHWAddress(Element baseElement,
EditFieldsPanel parentPanel,
NodeEditor nodeEditor)
baseElement - The element which contains all the XML information.parentPanel - Panel this panel should be child of.nodeEditor - Reference to the instance of the first EditorPanel, the NodeEditor.
protected static void displayPartName(Element baseElement,
EditFieldsPanel parentPanel,
NodeEditor nodeEditor)
baseElement - The element which contains all the XML information.parentPanel - Panel this field should be child of.nodeEditor - Reference to the instance of the first EditorPanel, the NodeEditor.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||