Bean Builder

com.adventnet.beans.text
Class NetAddressField

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.adventnet.beans.text.NetAddressField

public class NetAddressField
extends javax.swing.JPanel

Field used for displaying string of any form of string with seperator chars, especially * for showing mac address of form The bean provide the setText method to show the values during the runtime. Drop a NetAddressField from the AdventnetUtils.jar and set a string value to the Bean by the following method.

NetAddressField1.setText(String str);

The NetAddressField Bean also provides an option to Specify the seperator value,along with a option to Specify the Number of Fields to display the Values. for (e.g) we can try ifPhysAddress in the RFC-1213 Mib.

 NetAddressField1.setSeperator("-");
 NetAddressField1.setTextFields(3);
 

Version:
1.0
Author:
See Also:
JPanel, Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
 
Constructor Summary
NetAddressField()
          Use this constructor for Applications
NetAddressField(java.applet.Applet applet)
          Use this constructor for Applets
 
Method Summary
 void addActionListener(java.awt.event.ActionListener aLis)
          Add Listener to be notified in case of action event
 void clearText()
          removes all fields
 int getDigits()
           
 java.lang.String getParameter(java.lang.String input)
           
 java.lang.String getSeperator()
          get the seperator string
 java.lang.String getText()
           
 int getTextFields()
          get the number of fields
 java.lang.String[] getValidEntries()
          get the valid character entries allowed in the fields
 void init()
           
 void initializeText(javax.swing.JTextField tf)
           
 void initVariables()
           
static void main(java.lang.String[] args)
           
 void removeActionListener(java.awt.event.ActionListener rLis)
          remove Listener which is notified in case of action event
 void setConstraints(int x, int y, int width, int height, double wtX, double wtY, int anchor, int fill, java.awt.Insets inset, int padX, int padY)
           
 void setDigits(int d)
           
 void setSeperator(java.lang.String s)
          set the seperator string
 void setText(java.lang.String str)
          set the text to be displayed in the fields
 void setTextFields(int num)
          set the number of fields to be displayed
 void setUpGUI(java.awt.Container container)
           
 void setValidEntries(java.lang.String[] s)
          set the valid character entries allowed in the fields
 void showStatus(java.lang.String message)
           
 void showStatus(java.lang.String message, java.lang.Exception ex)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetAddressField

public NetAddressField()
Use this constructor for Applications

NetAddressField

public NetAddressField(java.applet.Applet applet)
Use this constructor for Applets
Parameters:
applet - :
Method Detail

initVariables

public void initVariables()
                   throws java.lang.Exception
Throws:
java.lang.Exception - :

setUpGUI

public void setUpGUI(java.awt.Container container)
              throws java.lang.Exception
Parameters:
container - :
Throws:
java.lang.Exception - :

getValidEntries

public java.lang.String[] getValidEntries()
get the valid character entries allowed in the fields
Returns:
'String[]'

setValidEntries

public void setValidEntries(java.lang.String[] s)
set the valid character entries allowed in the fields
Parameters:
s - :

getParameter

public java.lang.String getParameter(java.lang.String input)
Parameters:
input - :
Returns:
'String'

init

public void init()

showStatus

public void showStatus(java.lang.String message)
Parameters:
message - :

showStatus

public void showStatus(java.lang.String message,
                       java.lang.Exception ex)
Parameters:
ex - :

setTextFields

public void setTextFields(int num)
set the number of fields to be displayed
Parameters:
num - :

getTextFields

public int getTextFields()
get the number of fields
Returns:
'int'

setDigits

public void setDigits(int d)
Parameters:
d - :

getDigits

public int getDigits()
Returns:
'int'

setSeperator

public void setSeperator(java.lang.String s)
set the seperator string
Parameters:
s - :

getSeperator

public java.lang.String getSeperator()
get the seperator string
Returns:
'String'

clearText

public void clearText()
removes all fields

getText

public java.lang.String getText()
Returns:
'String'

setText

public void setText(java.lang.String str)
set the text to be displayed in the fields
Parameters:
str - :

initializeText

public void initializeText(javax.swing.JTextField tf)
Parameters:
tf - :

main

public static void main(java.lang.String[] args)

setConstraints

public void setConstraints(int x,
                           int y,
                           int width,
                           int height,
                           double wtX,
                           double wtY,
                           int anchor,
                           int fill,
                           java.awt.Insets inset,
                           int padX,
                           int padY)
Parameters:
x - :
y - :
width - :
height - :
wtX - :
wtY - :
anchor - :
fill - :
inset - :
padX - :
padY - :

addActionListener

public void addActionListener(java.awt.event.ActionListener aLis)
Add Listener to be notified in case of action event
Parameters:
aLis - :

removeActionListener

public void removeActionListener(java.awt.event.ActionListener rLis)
remove Listener which is notified in case of action event
Parameters:
rLis - :

Bean Builder

© 2001 - 2002 AdventNet Inc. Visit us at: http://www.adventnet.com