Class DCNodeConfigGUI
- All Implemented Interfaces:
DCNodeConfigGUIIfc
,ImageObserver
,MenuContainer
,Serializable
,Accessible
- Direct Known Subclasses:
EINodeConfigGUI
,OINodeConfigGUI
,ProcessorNodeConfigGUI
- See Also:
-
Nested Class Summary
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JCheckBox
Used to determine whether the raw data for this node (not NAR data) should be backed up periodically.protected String
Label string forbackupBox
protected JCheckBox
This field is used to determine if entire nar file data would be held in memory before writing to file or while reading from file.protected static final Font
protected NodeDestinationsGUI
Indicates whether this node is routing its output to other nodes.protected JLabel
protected static String
Label string forfileLevelTransactionCheckBox
protected JCheckBox
This field is used to determine if the cartridge participates in file level transaction node chain This field will not be added to the default tab, any cartridge wanting to to have file level transaction functionality should add this field to extended UI panelprotected JCheckBox
Check to turn on silent input monitoringprotected UDCNumericField
Number input field, minimum silent input time interval to wait before generating an alarmprotected JComboBox
The time units used for the inputMonitorTimeFieldprotected JCheckBox
Used to determine whether the input NAR files for this node should be backed up.protected com.nt.common.gui.SMGIntField
Number of days to retain NAR files in backup directory.protected static String
Label string fornarBackupDaysField
protected static String
Label string fornarBackupBox
protected DCNodeConfigData
Object which will contain the configuration values for a given node that were provided by the user in this GUI.protected boolean
Indicates whether the user has altered any fields in this GUI.protected JCheckBox
Used to turn on/off the Record Statistics Counter featureprotected JTabbedPane
Tabbed pane which contains all of the panels needed for configuring a particular node.Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
ConstructorsConstructorDescriptionDefault constructorInitializesnodeConfig
with the given DCNodeConfigData object and sets up the GUI components. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Sets the layout for this panel to a BorderLayout.protected void
addInputMonitoringFieldsToPanel
(com.nt.common.gui.SMGJLCPanel panel) Adds a checkbox, a number input box, and a combo box to the general tab panel.void
addNarBackupCheckbox
(com.nt.common.gui.SMGJLCPanel panel) Adds the "Backup NAR Files" checkbox to the "General" tab panelprotected void
Adds a panel totabbedPane
with the given label.protected void
addScrollPanel
(String label, JPanel new_panel, int height, int unit_inc) Adds a panel in a ScrollPane totabbedPane
with the given label.boolean
Check and warn the user if the Input Stream Monitoring interval will last longer than one week.void
defaultValue
(String name, long value, long min, long max) Sets the default value for the given configuration item, and will enforce the value to be within the specified range.void
defaultValue
(String name, String value) Sets the default value for the given configuration item.protected void
Hides the "Backup Node Data" checkbox in the "General" tabprotected void
Displays the "Backup Node Data" checkbox in the "General" tababstract void
Must be implemented in the derived class to add a node specific UI panel to the tabbed paneboolean
Indicates whether the user has checked the "Backup Node Data" checkboxBe default returns false.Populates the DCNodeConfigData Object with values from fields contained in the "General" tab panel which includes thedebugLevel
,maxLogFileSize
,recordStatistics
andbackup
fields.Retrieves the value that the user has entered for the "Debug Level" field.final Vector
Returns a Vector of NodeInfo objects representing the nodes that will receive output from the node being configured by this GUI.int
int
Returns the value of the "Max Log File Size" field.
If a message needs to be logged which causes this value to be exceeded, the log file will be moved to an archive file and a new log file will be started.getMaxValue
(String name) Returns the maximum value for the given configuration item.int
getMinValue
(String name) Returns the minimum value for the given configuration item.int
Returns the number of days to retain the NAR files in the node's backup directoryboolean
Indicates whether the user has checked the "Backup NAR Files" checkboxReturns the existing node destinations GUIfinal String
Returns the node identifier for the node that is being configured by this DCNodeConfigGUIIfc object.abstract void
getNodeSpecificConfigData
(DCNodeConfigData nodeData) Implemented by the derived class to populate the node specific config items in the nodeData objectboolean
Indicates whether the node can send output to other nodes.protected void
init()
Allows derived classes to perform any necessary initialization before any abstract methods are called.boolean
If user needs to perform any config action then this method needs to be override in the NodeConfigGUI class to return true.protected UDCIPAddressField
makeIPAddressField
(String contents, String toolTip) Creates an editable panel, containing 4 text fields, which allows the user to enter an IP Address.protected JPanel
Lays out the configuration panels for this GUI.protected JTextField
makeNumericTextField
(String contents, String toolTip) Creates an editable JTextField containing the given value with the specified tool tip.protected JTextField
makeNumericTextField
(String contents, String toolTip, int maxValue) Creates an editable JTextField containing the given value with the specified tool tip.protected JTextField
makeNumericTextField
(String contents, String toolTip, long minValue, long maxValue) Creates an editable JTextField containing the given value with the specified tool tip.protected static JPanel
Creates a panel which contains the given components with the given labels.protected static JPanel
Creates a panel which contains the given components with the given labels.protected JTextField
makeTextField
(String contents, int size, boolean editable, String toolTip) Creates a JTextField of the given size with the given properties.protected JTextField
makeTextField
(String contents, String toolTip) void
setBackupValue
(boolean value) Sets the value of the "Backup Node Data" checkboxvoid
setConfigRange
(String name, long min, long max) Sets the range of values for the given configuration item.void
setDebugLevel
(String value) Sets the value to display in the "Debug Level" field.abstract void
Method which sets the default configuration values for this node.final void
setDestinations
(Vector inTargets) Accepts a Vector of NodeInfo objects representing one or more nodes that the user has selected as a destination for this node's output.void
setMaxLogFileSize
(int max) void
setMaxLogSizeValue
(int size) Sets the value of the "Max Log File Size" field.
If a message needs to be logged which causes this value to be exceeded, the log file will be moved to an archive file and a new log file will be started.void
setMaxValueForLogSize
(int maxValue) Sets the maximum value that the user may enter in the "Max Log File Size:" field.void
setMinLogFileSize
(int min) void
setNarBackupDaysValue
(int value) Sets the value of the "NAR File Retention Period"void
setNarBackupValue
(boolean value) Sets the value of the "Backup NAR Files" checkboxfinal void
Sets the node identifier for the node that is being configured by this DCNodeConfigGUIIfc object.final void
setNodeInfo
(com.nt.udc.admin.NodeInfo ni) Sets the current node infoprotected void
setPanelsTab
(JPanel nodePanel) protected void
Sets the min and max values for "Debug Level" and "MaxLogFileSize" fields.protected void
validateConfig
(DCNodeConfigData config) Validates the values in the givenconfig
object, for those items which have been set with a valid range.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
tabbedPane
Tabbed pane which contains all of the panels needed for configuring a particular node. -
narBackupBox
Used to determine whether the input NAR files for this node should be backed up. -
bulkIOCheckBox
This field is used to determine if entire nar file data would be held in memory before writing to file or while reading from file. -
fileLevelTransactionLabel
Label string forfileLevelTransactionCheckBox
-
fileLevelTransCheckBox
This field is used to determine if the cartridge participates in file level transaction node chain This field will not be added to the default tab, any cartridge wanting to to have file level transaction functionality should add this field to extended UI panel -
fileLevelTransactionJLable
-
narBackupLabel
Label string fornarBackupBox
-
narBackupDaysField
protected com.nt.common.gui.SMGIntField narBackupDaysFieldNumber of days to retain NAR files in backup directory. -
narBackupDaysLabel
Label string fornarBackupDaysField
-
backupBox
Used to determine whether the raw data for this node (not NAR data) should be backed up periodically. -
backupLabel
Label string forbackupBox
-
inputMonitorEnableField
Check to turn on silent input monitoring -
inputMonitorTimeField
Number input field, minimum silent input time interval to wait before generating an alarm -
inputMonitorTimeUnitsField
The time units used for the inputMonitorTimeField -
recordCountEnableField
Used to turn on/off the Record Statistics Counter feature -
nodeConfig
Object which will contain the configuration values for a given node that were provided by the user in this GUI. -
nodeFieldsDirty
protected boolean nodeFieldsDirtyIndicates whether the user has altered any fields in this GUI. -
destGUI
Indicates whether this node is routing its output to other nodes. -
defaultFont
-
-
Constructor Details
-
DCNodeConfigGUI
public DCNodeConfigGUI()Default constructor -
DCNodeConfigGUI
InitializesnodeConfig
with the given DCNodeConfigData object and sets up the GUI components. This method callsinit()
before any abstract methods are called to allow derived classes to perform any necessary initialization. This method then callssetDefaults()
and thenaddGUIComponents()
.- Parameters:
ncd
- DCNodeConfigData object to be used for storing information provided by the user in this GUI.
-
-
Method Details
-
init
protected void init()Allows derived classes to perform any necessary initialization before any abstract methods are called. Base class provides an empty implementation. -
makePanel
Creates a panel which contains the given components with the given labels. Using the default label alignment ofSwingConstants.RIGHT
-
makePanel
Creates a panel which contains the given components with the given labels. Using the given alignment for the labels. -
allFieldsValid
public boolean allFieldsValid()Check and warn the user if the Input Stream Monitoring interval will last longer than one week.- Specified by:
allFieldsValid
in interfaceDCNodeConfigGUIIfc
- Returns:
true
if either the input stream monitoring interval is less than one week, or that the user is OK with the interval longer than one week.
-
isAnyConfigAction
public boolean isAnyConfigAction()If user needs to perform any config action then this method needs to be override in the NodeConfigGUI class to return true.- Specified by:
isAnyConfigAction
in interfaceDCNodeConfigGUIIfc
-
getConfigActionObject
Be default returns false. If some config action needs to be performed while configuring node then this method should return the ConfigActionIfc object.- Specified by:
getConfigActionObject
in interfaceDCNodeConfigGUIIfc
-
getDCNodeConfigData
Populates the DCNodeConfigData Object with values from fields contained in the "General" tab panel which includes thedebugLevel
,maxLogFileSize
,recordStatistics
andbackup
fields.
Calls the derived class'sgetNodeSpecificConfigData()
method to pick up any derived node specific configuration items.- Specified by:
getDCNodeConfigData
in interfaceDCNodeConfigGUIIfc
-
hasDestinations
public boolean hasDestinations()Indicates whether the node can send output to other nodes.
true
for EI and Processor nodes. Default returnsfalse
.- Specified by:
hasDestinations
in interfaceDCNodeConfigGUIIfc
- Returns:
false
-
getDestinations
Returns a Vector of NodeInfo objects representing the nodes that will receive output from the node being configured by this GUI.- Specified by:
getDestinations
in interfaceDCNodeConfigGUIIfc
- Returns:
- Vector of NodeInfo objects
-
setDestinations
Description copied from interface:DCNodeConfigGUIIfc
Accepts a Vector of NodeInfo objects representing one or more nodes that the user has selected as a destination for this node's output. (That is, the node that is being configured by this DCNodeConfigGUIIfc object.)
This method will only be called ifhasDestinations()
returnstrue
.- Specified by:
setDestinations
in interfaceDCNodeConfigGUIIfc
- Parameters:
inTargets
- Vector of NodeInfo objects
-
getNodeId
Description copied from interface:DCNodeConfigGUIIfc
Returns the node identifier for the node that is being configured by this DCNodeConfigGUIIfc object.- Specified by:
getNodeId
in interfaceDCNodeConfigGUIIfc
- Returns:
null
, if nodeId has not been set usingsetNodeId()
-
setNodeId
Description copied from interface:DCNodeConfigGUIIfc
Sets the node identifier for the node that is being configured by this DCNodeConfigGUIIfc object.- Specified by:
setNodeId
in interfaceDCNodeConfigGUIIfc
- Parameters:
inNodeId
- String representing the node id
-
setNodeInfo
public final void setNodeInfo(com.nt.udc.admin.NodeInfo ni) Description copied from interface:DCNodeConfigGUIIfc
Sets the current node info- Specified by:
setNodeInfo
in interfaceDCNodeConfigGUIIfc
- Parameters:
ni
- Current NodeInfo object
-
getDebugLevel
Retrieves the value that the user has entered for the "Debug Level" field. Valid values are:
OFF None - no messages are logged
ON Messages are logged with Exception trace if the cause is an Exception -
setDebugLevel
Sets the value to display in the "Debug Level" field. Valid values are:
OFF None - no messages are logged
ON Messages are logged with Exception trace if the cause is an Exception -
addNarBackupCheckbox
public void addNarBackupCheckbox(com.nt.common.gui.SMGJLCPanel panel) Adds the "Backup NAR Files" checkbox to the "General" tab panel -
getNarBackupValue
public boolean getNarBackupValue()Indicates whether the user has checked the "Backup NAR Files" checkbox -
setNarBackupValue
public void setNarBackupValue(boolean value) Sets the value of the "Backup NAR Files" checkbox -
getNarBackupDaysValue
public int getNarBackupDaysValue()Returns the number of days to retain the NAR files in the node's backup directory -
setNarBackupDaysValue
public void setNarBackupDaysValue(int value) Sets the value of the "NAR File Retention Period" -
enableBackupCheckbox
protected void enableBackupCheckbox()Displays the "Backup Node Data" checkbox in the "General" tab -
disableBackupCheckbox
protected void disableBackupCheckbox()Hides the "Backup Node Data" checkbox in the "General" tab -
getBackupValue
public boolean getBackupValue()Indicates whether the user has checked the "Backup Node Data" checkbox -
setBackupValue
public void setBackupValue(boolean value) Sets the value of the "Backup Node Data" checkbox -
getMaxLogSizeValue
public int getMaxLogSizeValue()Returns the value of the "Max Log File Size" field.
If a message needs to be logged which causes this value to be exceeded, the log file will be moved to an archive file and a new log file will be started.Default maximum value is
DCNodeConfigDefaults.MAX_LOG_FILE_SIZE
-
setMaxLogSizeValue
public void setMaxLogSizeValue(int size) Sets the value of the "Max Log File Size" field.
If a message needs to be logged which causes this value to be exceeded, the log file will be moved to an archive file and a new log file will be started.Default maximum value is
DCNodeConfigDefaults.MAX_LOG_FILE_SIZE
-
setMaxValueForLogSize
public void setMaxValueForLogSize(int maxValue) Sets the maximum value that the user may enter in the "Max Log File Size:" field. -
getNodeDestinationsGUI
Description copied from interface:DCNodeConfigGUIIfc
Returns the existing node destinations GUI- Specified by:
getNodeDestinationsGUI
in interfaceDCNodeConfigGUIIfc
-
getMinLogFileSize
public int getMinLogFileSize() -
getMaxLogFileSize
public int getMaxLogFileSize() -
setMinLogFileSize
public void setMinLogFileSize(int min) -
setMaxLogFileSize
public void setMaxLogFileSize(int max) -
addGUIComponents
protected void addGUIComponents()Sets the layout for this panel to a BorderLayout. CallsmakeNodePanel
to layout the necessary panels for this GUI, including any node specific panels, and addstabbedPane
as theBorderLayout.CENTER
component and callsvalidate()
. -
setPanelsTab
-
addPanel
Adds a panel totabbedPane
with the given label.- Parameters:
label
- Name for the panelnew_panel
- Panel to be added
-
addScrollPanel
Adds a panel in a ScrollPane totabbedPane
with the given label.- Parameters:
label
- Name for the panelnew_panel
- Panel to be addedheight
- Preferred Height for the Scroll Paneunit_inc
- Unit Increment value for the scroll bars (if non-zero)
-
makeNodePanel
Lays out the configuration panels for this GUI.
Allows the user to set values for the following fields:"Debug Level:"
, which is populated from
; andDCNodeConfigData#DEBUG
"Max Log File Size:"
, which is populated fromDCNodeConfigData.LOGFILESIZE
"Record Statistics Counting:"
, which is populated fromDCNodeConfigData.RECORDSTATS
using the DCNodeConfigData object that was passed in to the constructor.
-
addInputMonitoringFieldsToPanel
protected void addInputMonitoringFieldsToPanel(com.nt.common.gui.SMGJLCPanel panel) Adds a checkbox, a number input box, and a combo box to the general tab panel. These 3 fields are the input to the Input Monitoring feature.- Parameters:
panel
- This should be the General Tab Panel.
-
makeTextField
- Returns:
- value of
makeTextField()
with a size of 5 and editable set totrue
-
makeTextField
Creates a JTextField of the given size with the given properties.- Parameters:
contents
- Text, if any, to display in the text fieldsize
- Width of the text fieldeditable
- Indicates whether the contents of the field may be changed by the usertoolTip
- String to display when the user's cursor lingers over the field
-
defaultValue
Sets the default value for the given configuration item. -
defaultValue
Sets the default value for the given configuration item, and will enforce the value to be within the specified range.- Parameters:
name
- name of the configuration item to be setvalue
- desired "default" value for this itemmin
- minimum value for this itemmax
- maximum value for this item
-
setConfigRange
Sets the range of values for the given configuration item.- Parameters:
name
- name of the configuration item to set the range formin
- minimum value for this itemmax
- maximum value for this item
-
getMinValue
Returns the minimum value for the given configuration item. Returnsnull
, if no range has been set for the specified item. -
getMaxValue
Returns the maximum value for the given configuration item. Returnsnull
, if no range has been set for the specified item. -
makeNumericTextField
Creates an editable JTextField containing the given value with the specified tool tip. By default, the column width is5
, minimum value is0
, and maximum isLong.MAX_VALUE
.- Parameters:
contents
- Text, if any, to display in the text fieldtoolTip
- String to display when the user's cursor lingers over the field
-
makeNumericTextField
Creates an editable JTextField containing the given value with the specified tool tip. The column width is5
, and the given maximum value is imposed. The minimum value is 0.- Parameters:
contents
- Text, if any, to display in the text fieldtoolTip
- String to display when the user's cursor lingers over the fieldmaxValue
- Indicates the maximum value that the user may enter in the field.
-
makeNumericTextField
protected JTextField makeNumericTextField(String contents, String toolTip, long minValue, long maxValue) Creates an editable JTextField containing the given value with the specified tool tip. The column width is5
, and the given minimum or maximum values are imposed.Validation is performed when the component loses focus. If the user enters a value that is non-numeric or is less than the given minimum value, the minimum value will be used (and displayed in the textfield). If the user enters a value greater than the maximum value, the maximum value will be used.
If the given
minValue
is greater than the givenmaxValue
, thenminValue
value will be equal tomaxValue
.- Parameters:
contents
- Text, if any, to display in the text fieldtoolTip
- String to display when the user's cursor lingers over the fieldminValue
- Indicates the minimum value that the user may enter in the field.maxValue
- Indicates the maximum value that the user may enter in the field.
-
makeIPAddressField
Creates an editable panel, containing 4 text fields, which allows the user to enter an IP Address. Ifcontents
is null, a default of "0.0.0.0" is used to initially populate the fields.- Parameters:
contents
- IP Address, if any, to display in the text fieldtoolTip
- String to display when the user's cursor lingers over the component
-
validateConfig
Validates the values in the givenconfig
object, for those items which have been set with a valid range.If a range has been specified for a configuration item, and the current value of that item is outside the given range, the current value will be updated to reflect either the minimum or maximum value. If the current value is less than the minimum, the value in the
config
will be updated to reflect the minimum value of the range. The maximum value will be used if the value is greater than the maximum value of the range. If the current value is invalid (i.e. text instead of a number), the minimum value will be used.- See Also:
-
setRangeValues
protected void setRangeValues()Sets the min and max values for "Debug Level" and "MaxLogFileSize" fields. -
getNodeSpecificConfigData
Implemented by the derived class to populate the node specific config items in the nodeData object- Specified by:
getNodeSpecificConfigData
in interfaceDCNodeConfigGUIIfc
-
extendConfigGUI
public abstract void extendConfigGUI()Must be implemented in the derived class to add a node specific UI panel to the tabbed pane- Specified by:
extendConfigGUI
in interfaceDCNodeConfigGUIIfc
-
setDefaults
public abstract void setDefaults()Method which sets the default configuration values for this node.
-