|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.text.JTextComponent
|
+--javax.swing.JTextField
|
+--JMeter
Component: JMeter Displays numbers in a textbox with correct decimal format. Target user cannot modify the component. Behaves exactly like a JTextField, except the setText() method has been disabled.
| Inner classes inherited from class javax.swing.JTextField |
javax.swing.JTextField.AccessibleJTextField |
| Inner classes inherited from class javax.swing.text.JTextComponent |
javax.swing.text.JTextComponent.AccessibleJTextComponent,
javax.swing.text.JTextComponent.KeyBinding |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Fields inherited from class javax.swing.JTextField |
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
DEFAULT_KEYMAP,
FOCUS_ACCELERATOR_KEY |
| 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 | |
JMeter()
Default constructor (parameter-less). |
|
JMeter(java.awt.Color bg,
java.awt.Color fg)
Constructor with user-defined background and foreground. |
|
JMeter(int leftAccuracy,
int rightAccuracy)
Constructor with user-defined left and right of decimal accuracy. |
|
JMeter(int leftAccuracy,
int rightAccuracy,
java.awt.Color bg,
java.awt.Color fg)
Constructor with user-defined accuracy and colors. |
|
| Method Summary | |
int |
getLeftAccuracy()
Accessor for number left accuracy. |
int |
getRightAccuracy()
Accessor for right accuracy. |
protected void |
Init()
Initializations common to all constructors. |
protected void |
processComponentKeyEvent(java.awt.event.KeyEvent event)
Disallows special key input. |
protected void |
processInputMethodEvent(java.awt.event.InputMethodEvent event)
Disallows normal user input. |
void |
redrawMeter()
Redraws the meter. |
void |
resetMeter()
Meter is zero'ed. |
void |
setLeftAccuracy(int n)
Mutator for left accuracy. |
void |
setRightAccuracy(int n)
Mutator for left accuracy. |
void |
setText(java.lang.String s)
Disabled for safety purposes. |
void |
setValue(double num)
Set the value of the meter using data of type double. |
void |
setValue(int num)
Set the value of the meter using data of type int. |
void |
setValue(long num)
Set the value of the meter using data of type long. |
void |
setValue(short num)
Set the value of the meter using data of type short. |
| Methods inherited from class javax.swing.JTextField |
addActionListener,
createDefaultModel,
fireActionPerformed,
getAccessibleContext,
getActions,
getColumns,
getColumnWidth,
getHorizontalAlignment,
getHorizontalVisibility,
getPreferredSize,
getScrollOffset,
getUIClassID,
isValidateRoot,
paramString,
postActionEvent,
removeActionListener,
scrollRectToVisible,
setActionCommand,
setColumns,
setFont,
setHorizontalAlignment,
setScrollOffset |
| Methods inherited from class javax.swing.text.JTextComponent |
addCaretListener,
addKeymap,
copy,
cut,
fireCaretUpdate,
getCaret,
getCaretColor,
getCaretPosition,
getDisabledTextColor,
getDocument,
getFocusAccelerator,
getHighlighter,
getInputMethodRequests,
getKeymap,
getKeymap,
getMargin,
getPreferredScrollableViewportSize,
getScrollableBlockIncrement,
getScrollableTracksViewportHeight,
getScrollableTracksViewportWidth,
getScrollableUnitIncrement,
getSelectedText,
getSelectedTextColor,
getSelectionColor,
getSelectionEnd,
getSelectionStart,
getText,
getText,
getUI,
isEditable,
isFocusTraversable,
isOpaque,
loadKeymap,
modelToView,
moveCaretPosition,
paste,
read,
removeCaretListener,
removeKeymap,
removeNotify,
replaceSelection,
select,
selectAll,
setCaret,
setCaretColor,
setCaretPosition,
setDisabledTextColor,
setDocument,
setEditable,
setEnabled,
setFocusAccelerator,
setHighlighter,
setKeymap,
setMargin,
setOpaque,
setSelectedTextColor,
setSelectionColor,
setSelectionEnd,
setSelectionStart,
setUI,
updateUI,
viewToModel,
write |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
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,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isLightweightComponent,
isManagingFocus,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
paint,
paintBorder,
paintChildren,
paintComponent,
paintImmediately,
paintImmediately,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
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,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate,
validateTree |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
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,
printAll,
processComponentEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
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 |
public JMeter()
public JMeter(java.awt.Color bg,
java.awt.Color fg)
bg - initial background colorfg - initial foreground color, color of text
public JMeter(int leftAccuracy,
int rightAccuracy)
leftAccuracy - accuracy of digits to the left of decimalrightAccuracy - accuracy of digits to the right of decimal
public JMeter(int leftAccuracy,
int rightAccuracy,
java.awt.Color bg,
java.awt.Color fg)
leftAccuracy - accuracy of digits to the left of decimalrightAccuracy - accuracy of digits to the right of decimalbg - initial background colorfg - initial foreground color, color of text| Method Detail |
protected void Init()
public int getLeftAccuracy()
public int getRightAccuracy()
public void setLeftAccuracy(int n)
public void setRightAccuracy(int n)
public void setText(java.lang.String s)
public void setValue(short num)
public void setValue(int num)
public void setValue(long num)
public void setValue(double num)
public void resetMeter()
public void redrawMeter()
protected void processComponentKeyEvent(java.awt.event.KeyEvent event)
protected void processInputMethodEvent(java.awt.event.InputMethodEvent event)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||