public class MarkerBar extends MicrobaComponent
Features:
BoundedTableModelListSelectionModelMarkerMutationModelMarkerBarUI
This implementation queries marker positions from a single table column of
the data model. The index defaults to 0, but you can specify it with
.
A marker is considered to be unmovable, if corresponding table cell of the
data model is reported to be uneditable.
setPositionColumn(int)
This implementation determines the only currently selected marker with
of the selection model, so current selection model's selection mode has no
effect.ListSelectionModel.getLeadSelectionIndex()
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROPERTY_COLOR_COLUMN
The name of a "colorColumn" property.
|
static java.lang.String |
PROPERTY_DATA_MODEL
The name of a "dataModel" property.
|
static java.lang.String |
PROPERTY_FLIP
The name of a "fliped" property.
|
static java.lang.String |
PROPERTY_MUTATION_MODEL
The name of a "mutationModel" property.
|
static java.lang.String |
PROPERTY_ORIENTATION
The name of a "orientation" property.
|
static java.lang.String |
PROPERTY_POSITION_COLUMN
The name of a "positionColumn" property.
|
static java.lang.String |
PROPERTY_SELECTION_MODEL
The name of a "selectionModel" property.
|
PROPERTY_NAME_COLOR_OVERRIDE_MAPTOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
MarkerBar()
Constructs a
MarkerBar with all models set to a single
DefaultMarkerModel. |
MarkerBar(BoundedTableModel dataModel)
Constructs a
MarkerBar with given data model, a
DefaultListSelectionModel |
MarkerBar(BoundedTableModel dataModel,
javax.swing.ListSelectionModel selectionModel)
Constructs a
MarkerBar with given data model and selection
model. |
MarkerBar(int orientation)
Constructs a
MarkerBar with given orientation. |
| Modifier and Type | Method and Description |
|---|---|
int |
getColorColumn()
Returns an index of currently used table column to query marker color.
|
BoundedTableModel |
getDataModel()
Returns current data model.
|
int |
getMarkerSideGap()
Returns a distance in pixeld between the edge of the component (left &
right edge for horizontal orientation, top & bottom edge for vertical)
and a marker beak point in outermost position.
|
MarkerMutationModel |
getMutationModel()
Returns current mutation model.
|
int |
getOrientation()
Returns current component orientation.
|
int |
getPositionColumn()
Returns an index of currently used table column to query marker position.
|
javax.swing.ListSelectionModel |
getSelectionModel()
Returns current selection model.
|
java.lang.String |
getUIClassID()
Look&Feel UI delegate key (classID).
|
boolean |
isFliped()
Returns current flip flag value.
|
void |
setColorColumn(int colorColumn)
Sets the index of the data model table column used to query marker color.
|
void |
setDataModel(BoundedTableModel model)
Replaces current data model with specified one.
|
void |
setFliped(boolean flip)
Set flip flag value.
|
void |
setMutationModel(MarkerMutationModel mutationModel)
Replaces current mutation model with given one.
|
void |
setOrientation(int orientation)
Re-orientates the component.
|
void |
setPositionColumn(int positionColumn)
Sets the index of the data model table column used to query marker
position.
|
void |
setSelectionModel(javax.swing.ListSelectionModel selectionModel)
Replaces current selection model with given one.
|
getColorOverrideMap, getUI, setColorOverrideMap, updateUIaddAncestorListener, 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, 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, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final java.lang.String PROPERTY_DATA_MODEL
public static final java.lang.String PROPERTY_SELECTION_MODEL
public static final java.lang.String PROPERTY_MUTATION_MODEL
public static final java.lang.String PROPERTY_ORIENTATION
public static final java.lang.String PROPERTY_POSITION_COLUMN
public static final java.lang.String PROPERTY_COLOR_COLUMN
public static final java.lang.String PROPERTY_FLIP
public MarkerBar()
MarkerBar with all models set to a single
DefaultMarkerModel.DefaultMarkerModelpublic MarkerBar(int orientation)
MarkerBar with given orientation. All models
set to a single DefaultMarkerModel.orientation - initial orientation. Possible values:
SwingConstants.HORIZONTAL or
SwingConstants.VERTICALDefaultMarkerModelpublic MarkerBar(BoundedTableModel dataModel)
MarkerBar with given data model, a
DefaultListSelectionModel as selection model and no mutation model.dataModel - initial data model. May be nullBoundedTableModelpublic MarkerBar(BoundedTableModel dataModel, javax.swing.ListSelectionModel selectionModel)
MarkerBar with given data model and selection
model. No mutation model.dataModel - initial data model. May be null;selectionModel - initial selection model.BoundedTableModelpublic java.lang.String getUIClassID()
"MarkerBarUI".getUIClassID in class javax.swing.JComponentpublic BoundedTableModel getDataModel()
setDataModel(BoundedTableModel),
BoundedTableModelpublic void setDataModel(BoundedTableModel model)
model - new data model.getDataModel(),
getPositionColumn(),
BoundedTableModelpublic int getOrientation()
setOrientation(int)public void setOrientation(int orientation)
orientation - new orientation value. Possible values:
SwingConstants.HORIZONTAL or
SwingConstants.VERTICALgetOrientation()public MarkerMutationModel getMutationModel()
setMutationModel(MarkerMutationModel),
MarkerMutationModelpublic void setMutationModel(MarkerMutationModel mutationModel)
mutationModel - new mutation model. May be null.getMutationModel(),
MarkerMutationModelpublic javax.swing.ListSelectionModel getSelectionModel()
setSelectionModel(ListSelectionModel)public void setSelectionModel(javax.swing.ListSelectionModel selectionModel)
ListSelectionModel.getLeadSelectionIndex() to
determine selected marker.selectionModel - new selection model. May be null.getSelectionModel()public int getPositionColumn()
setPositionColumn(int)public void setPositionColumn(int positionColumn)
positionColumn - new position column index.getPositionColumn()public int getColorColumn()
setColorColumn(int)public void setColorColumn(int colorColumn)
colorColumn - new color column index.getColorColumn()public int getMarkerSideGap()
MarkerBarUIpublic boolean isFliped()
The flip flag defines where marker bicks are pointed:
true: down for horizontal orientation, left for vertical.
false: up for horizontal orientation, right for vertical.
public void setFliped(boolean flip)
The flip flag defines where marker bicks are pointed:
true: down for horizontal orientation, left for vertical.
false: up for horizontal orientation, right for vertical.
flip - new flip flag value.