public abstract class LabelWidget
extends javax.swing.JComponent
| Modifier and Type | Field and Description |
|---|---|
static int |
DROP_DOWN_MENU_WIDTH |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
LabelWidget(java.lang.String initLabelText,
java.awt.Color fieldColor,
java.awt.Color tooltipBackground)
BlockLabel Constructor that takes in BlockID as well.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyListenerToTextField(java.awt.event.KeyListener l) |
void |
addMouseListenerToLabel(java.awt.event.MouseListener l) |
void |
addMouseMotionListenerToLabel(java.awt.event.MouseMotionListener l) |
void |
assignToolTipToLabel(java.lang.String text)
sets the tool tip of the label
|
boolean |
canProcessNegativeSign()
returns true if this block should can accept a negative sign
|
boolean |
editingText()
editingText returns if BlockLable is being edited
|
java.lang.String |
getText()
getText
|
boolean |
hasSiblings() |
void |
highlightText()
high lights the text of the editing text field from
0 to the end of textfield
|
boolean |
isEditable()
isEditable returns if BlockLable is editable
|
boolean |
isNumeric()
isEditable returns if BlockLable is editable
|
void |
setEditable(boolean isEditable)
setEditable state of BlockLabel
|
void |
setEditingState(boolean editing)
setEditingState sets the current editing state of the BlockLabel.
|
void |
setFont(java.awt.Font font)
set up fonts
|
void |
setNumeric(boolean isNumber) |
void |
setSiblings(boolean hasSiblings,
java.lang.String[][] siblings) |
void |
setText(boolean bool)
setText to a boolean
|
void |
setText(double value)
setText to a NumberFormatted double
|
void |
setText(java.lang.String string)
setText to a String (trimmed to remove excess spaces)
|
void |
setZoomLevel(double newZoom) |
void |
showMenuIcon(boolean show) |
java.lang.String |
toString() |
void |
updateLabelText(java.lang.String text)
updateLabelText updates labelText and sychronizes textField and textLabel to it
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, 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, getPeer, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final int DROP_DOWN_MENU_WIDTH
public LabelWidget(java.lang.String initLabelText,
java.awt.Color fieldColor,
java.awt.Color tooltipBackground)
public void addKeyListenerToTextField(java.awt.event.KeyListener l)
public void addMouseListenerToLabel(java.awt.event.MouseListener l)
public void addMouseMotionListenerToLabel(java.awt.event.MouseMotionListener l)
public void showMenuIcon(boolean show)
public void setEditingState(boolean editing)
public boolean editingText()
public void setEditable(boolean isEditable)
isEditable - specifying editable state of BlockLabelpublic boolean isEditable()
public void setNumeric(boolean isNumber)
public boolean isNumeric()
public void setSiblings(boolean hasSiblings,
java.lang.String[][] siblings)
public boolean hasSiblings()
public void setFont(java.awt.Font font)
setFont in class javax.swing.JComponentfont - public void assignToolTipToLabel(java.lang.String text)
public java.lang.String getText()
public void setText(double value)
value - public void setText(java.lang.String string)
string - public void setText(boolean bool)
bool - public void updateLabelText(java.lang.String text)
text - public void highlightText()
public void setZoomLevel(double newZoom)
public java.lang.String toString()
toString in class java.awt.Componentpublic boolean canProcessNegativeSign()