public class propertyDialog
extends javax.swing.JDialog
implements java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.awt.event.WindowListener
The class propertyDialog is used to set the bean properties. A user can add an actionListener to be notified when the "Apply" or "OK" button is pressed.
The user can configure the host name, the port number, the community name, the socket type and the update interval.
The "Try it" button activates the IsHostReachableBean, who will probe the configured host and signals the UI since when the host was up.
IsHostReachableBean
,
Serialized Formjavax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector |
actionPerformedListener |
protected javax.swing.JButton |
applyButton |
protected java.lang.String |
bindAddr |
protected javax.swing.JLabel |
bindLabel |
protected javax.swing.JTextField |
bindText |
protected javax.swing.JButton |
cancelButton |
protected javax.swing.JLabel |
commLabel |
protected java.lang.String |
community |
protected javax.swing.JTextField |
communityText |
protected java.awt.GridBagLayout |
gridBagLayout1 |
protected java.lang.String |
host |
protected javax.swing.JLabel |
hostLabel |
protected javax.swing.JTextField |
hostText |
protected java.lang.String |
interval |
protected javax.swing.JTextField |
intervalText |
protected javax.swing.JLabel |
intLabel |
protected javax.swing.JLabel |
messageLabel |
protected javax.swing.JButton |
okButton |
protected java.lang.String |
port |
protected javax.swing.JLabel |
portLabel |
protected javax.swing.JTextField |
portText |
protected IsHostReachableBean |
reachableBean |
protected java.lang.String |
socketType |
protected javax.swing.JButton |
tryButton |
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
propertyDialog(javax.swing.JFrame frame)
The constructor to create a non-modal JDialog with the title "Property
JDialog".
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Implements the ActionListener
|
void |
addActionListener(java.awt.event.ActionListener l)
Adds an action listener to be notified when the "Apply" or "OK" button
is pressed.
|
protected void |
fireActionPerformed(int id,
java.lang.String comm,
int modif)
Fires a action event when the "Apply" or "OK"
button is pressed.
|
java.lang.String |
getBindAddress()
Returns the local bind address
|
java.lang.String |
getCommunityName()
Returns the community name string
|
java.lang.String |
getHost()
Returns the host string
|
java.lang.String |
getPort()
Returns the port string
|
java.lang.String |
getSocketType()
Returns the socket type string
|
java.lang.String |
getUpdateInterval()
Returns the update interval string
|
void |
propertyChange(java.beans.PropertyChangeEvent e)
Implements the PropertyChangeListener
|
void |
removeActionListener(java.awt.event.ActionListener l)
Removes an action listener.
|
void |
setBindAddress(java.lang.String s)
Sets the local bind address
|
void |
setCommunityName(java.lang.String s)
Sets the community name string.
|
void |
setHost(java.lang.String s)
Sets the host string.
|
void |
setPort(java.lang.String s)
Sets the port string.
|
void |
setSocketType(java.lang.String newVar)
Sets the socket type string.
|
void |
setUpdateInterval(java.lang.String s)
Sets the update interval string.
|
void |
windowActivated(java.awt.event.WindowEvent evt) |
void |
windowClosed(java.awt.event.WindowEvent evt) |
void |
windowClosing(java.awt.event.WindowEvent evt) |
void |
windowDeactivated(java.awt.event.WindowEvent evt) |
void |
windowDeiconified(java.awt.event.WindowEvent evt) |
void |
windowIconified(java.awt.event.WindowEvent evt) |
void |
windowOpened(java.awt.event.WindowEvent evt) |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected java.awt.GridBagLayout gridBagLayout1
protected javax.swing.JLabel hostLabel
protected javax.swing.JLabel portLabel
protected javax.swing.JLabel commLabel
protected javax.swing.JLabel intLabel
protected javax.swing.JLabel bindLabel
protected javax.swing.JTextField hostText
protected javax.swing.JTextField bindText
protected javax.swing.JTextField portText
protected javax.swing.JTextField communityText
protected javax.swing.JTextField intervalText
protected javax.swing.JLabel messageLabel
protected IsHostReachableBean reachableBean
protected javax.swing.JButton tryButton
protected javax.swing.JButton okButton
protected javax.swing.JButton cancelButton
protected javax.swing.JButton applyButton
protected java.lang.String host
protected java.lang.String bindAddr
protected java.lang.String port
protected java.lang.String community
protected java.lang.String interval
protected java.lang.String socketType
protected java.util.Vector actionPerformedListener
public propertyDialog(javax.swing.JFrame frame)
frame
- the parent framepublic void setHost(java.lang.String s)
s
- the stringpublic void setBindAddress(java.lang.String s)
s
- the stringpublic void setPort(java.lang.String s)
s
- the stringpublic void setCommunityName(java.lang.String s)
s
- the stringpublic void setUpdateInterval(java.lang.String s)
s
- the stringpublic void setSocketType(java.lang.String newVar)
newVar
- the socket typepublic java.lang.String getSocketType()
public java.lang.String getHost()
public java.lang.String getBindAddress()
public java.lang.String getPort()
public java.lang.String getCommunityName()
public java.lang.String getUpdateInterval()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
public void addActionListener(java.awt.event.ActionListener l)
public void removeActionListener(java.awt.event.ActionListener l)
protected void fireActionPerformed(int id, java.lang.String comm, int modif)
removeActionListener(java.awt.event.ActionListener)
,
addActionListener(java.awt.event.ActionListener)
,
ActionEvent
,
ActionListener
public void windowActivated(java.awt.event.WindowEvent evt)
windowActivated
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent evt)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent evt)
windowClosing
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent evt)
windowClosed
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent evt)
windowIconified
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent evt)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent evt)
windowOpened
in interface java.awt.event.WindowListener