|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPopupMenu com.jstatcom.table.JSCPopupTypes
public abstract class JSCPopupTypes
The DataTablePopupTypes
class defines different popups that
can be used by data tables. This class can be extended to provide special
popup menus in a certain context on a JSCDataTable
.
It implements the typesave enum pattern (Joshua Bloch, "Effective
Java", Item 21) . If you compare DataTablePopupTypes
,
always use the ==
operator. This is save, because they are
Singletons (Gamma et al., 1995) .
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPopupMenu |
---|
javax.swing.JPopupMenu.Separator |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static JSCPopupTypes |
CLICK_01
PopupMenu for click change between * and 0. |
static JSCPopupTypes |
CLICK_012
PopupMenu for click change between * , 0 and !. |
static JSCPopupTypes |
PRECISION
PopupMenu for precision change, as well as to toggle the
use of scientific representation of numbers. |
static JSCPopupTypes |
PRECISION_NOSCIENTIFIC
PopupMenu for precision change. |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
DataTablePopupTypes implement ActionListener
and can therefore register themselves as listeners, for example with the
menu items that are added to them. |
boolean |
equals(java.lang.Object o)
Override prevention method to enforce a.equals(b) if and
only if a==b . |
java.awt.Component |
getDataTable()
Gets a reference to the unterlying data table. |
java.lang.String |
getName()
Gets the name of this type. |
int |
hashCode()
Override prevention method invokes super method. |
void |
processMouseEvent(java.awt.event.MouseEvent e,
javax.swing.MenuElement[] path,
javax.swing.MenuSelectionManager manager)
Triggers the popup menu if the invoker was a JSCDataTable
with a number type. |
void |
setDataTable(java.awt.Component newDataTable)
Sets a reference to the unterlying data table. |
java.lang.String |
toString()
Gets a string representing this type, do not use for comparisons. |
Methods inherited from class javax.swing.JPopupMenu |
---|
add, add, add, addMenuKeyListener, addPopupMenuListener, addSeparator, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMargin, getMenuKeyListeners, getPopupMenuListeners, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, processKeyEvent, remove, removeMenuKeyListener, removePopupMenuListener, setBorderPainted, setDefaultLightWeightPopupEnabled, setInvoker, setLabel, setLightWeightPopupEnabled, setLocation, setPopupSize, setPopupSize, setSelected, setSelectionModel, setUI, setVisible, show, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, 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, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, 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, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, 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, 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, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, 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, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final JSCPopupTypes CLICK_01
PopupMenu
for click change between * and 0. If a subset
restriction is set, the corresponding element is not changed.
public static final JSCPopupTypes CLICK_012
PopupMenu
for click change between * , 0 and !. If a
subset restriction is set, the corresponding element is not changed.
public static final JSCPopupTypes PRECISION
PopupMenu
for precision change, as well as to toggle the
use of scientific representation of numbers.
public static final JSCPopupTypes PRECISION_NOSCIENTIFIC
PopupMenu
for precision change.
Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent evt)
DataTablePopupTypes
implement ActionListener
and can therefore register themselves as listeners, for example with the
menu items that are added to them. Subclasses can overwrite the empty
default implementation of this method.
actionPerformed
in interface java.awt.event.ActionListener
evt
- the action eventpublic final boolean equals(java.lang.Object o)
a.equals(b)
if and
only if a==b
.
equals
in class java.lang.Object
o
- object to compare with
true
if equal, false
otherwisepublic final java.awt.Component getDataTable()
public final java.lang.String getName()
getName
in class java.awt.Component
public final int hashCode()
hashCode
in class java.lang.Object
public void processMouseEvent(java.awt.event.MouseEvent e, javax.swing.MenuElement[] path, javax.swing.MenuSelectionManager manager)
JSCDataTable
with a number type.
processMouseEvent
in interface javax.swing.MenuElement
processMouseEvent
in class javax.swing.JPopupMenu
e
- the mouse eventpath
- can be null
in this contextmanager
- can be null
in this contextpublic final void setDataTable(java.awt.Component newDataTable)
newDataTable
- the data tablepublic final java.lang.String toString()
toString
in class java.awt.Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |