public class DefaultEventObjectRenderer extends JLabel implements ITimelineObjectRenderer
DefaultEventObject
,
LayerContainer.setTimelineObjectRenderer(Class, ITimelineObjectRenderer)
,
Serialized FormJLabel.AccessibleJLabel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
DefaultEventObjectRenderer()
Constructs a new event object renderer that will use the default icon for
events (see
IconId.EVENT ). |
DefaultEventObjectRenderer(Icon icon,
Icon selectedIcon)
Constructs a new event object renderer.
|
Modifier and Type | Method and Description |
---|---|
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
char oldValue,
char newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
double oldValue,
double newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
float oldValue,
float newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
long oldValue,
long newValue)
Overriden for performance reasons.
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
short oldValue,
short newValue)
Overriden for performance reasons.
|
Icon |
getIcon()
Returns the icon that will be used to visualize the event (subclasses can
override to dynamically return different icons based on event
properties).
|
JLabel |
getLabel()
Returns the label that is being used to show the icons.
|
Icon |
getSelectedIcon()
Returns the icon that will be used to visualize the event when it is
currently selected (subclasses can override to dynamically return
different icons based on event properties).
|
TimelineObjectPath |
getTimelineObjectPath()
Returns the path to the currently rendered event object.
|
Component |
getTimelineObjectRendererComponent(TimelineObjectLayer layer,
TimelineObjectPath path,
boolean selected,
boolean focus,
boolean highlighted,
int row)
Returns a component that will be used to renderer the given timeline
object.
|
Insets |
getTimelineObjectRendererInsets(int x,
int y,
int width,
int height)
Returns the insets of the object renderer.
|
void |
invalidate()
Overriden for performance reasons.
|
boolean |
isVisible()
Overriden in order to fix a bug in AWT, which causes the cursor to
flicker during drag and drop operations.
|
void |
repaint()
Overriden for performance reasons.
|
void |
repaint(int x,
int y,
int width,
int height)
Overriden for performance reasons.
|
void |
repaint(long tm)
Overriden for performance reasons.
|
void |
revalidate()
Overriden for performance reasons.
|
void |
setIcon(Icon icon)
Sets the icon that will be used to visualize the event.
|
void |
setSelectedIcon(Icon icon)
Sets the icon that will be used to visualize the event when it is
selected
|
void |
validate()
Overriden for performance reasons.
|
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public DefaultEventObjectRenderer(Icon icon, Icon selectedIcon)
icon
- the icon that will represent the eventselectedIcon
- an icon that will be shown when the event is selectedpublic DefaultEventObjectRenderer()
IconId.EVENT
). No separate icon will be used for
situations when the event is selected. Instead the standard feedback will
be shown as inherited from the superclass (red triangle corners).public Component getTimelineObjectRendererComponent(TimelineObjectLayer layer, TimelineObjectPath path, boolean selected, boolean focus, boolean highlighted, int row)
ITimelineObjectRenderer
getTimelineObjectRendererComponent
in interface ITimelineObjectRenderer
layer
- the layer in which the timeline object will be renderedpath
- the path to the timeline object that gets renderedselected
- if TRUE the object is currently selected and the rendering
needs to express thatfocus
- if TRUE the focus is currently on the timeline object and the
rendering needs to express thathighlighted
- if TRUE the timeline object is highlighted and its appearance
needs to vary from its normal appearance (causing a blinking
effect)row
- the row in which the object gets drawnpublic Insets getTimelineObjectRendererInsets(int x, int y, int width, int height)
ITimelineObjectRenderer
DefaultActivityObjectRenderer
).getTimelineObjectRendererInsets
in interface ITimelineObjectRenderer
x
- the x-coordinate of the bounds that will be assigned to the
renderer componenty
- the y-coordinate of the bounds that will be assigned to the
renderer componentwidth
- the width of the bounds that will be assigned to the renderer
componentheight
- the height of the bounds that will be assigned to the renderer
componentpublic Icon getIcon()
public void setIcon(Icon icon)
public Icon getSelectedIcon()
public void setSelectedIcon(Icon icon)
icon
- the icon to use for visualizing the event when it is selectedpublic JLabel getLabel()
public TimelineObjectPath getTimelineObjectPath()
public void validate()
public void invalidate()
invalidate
in class Container
public void revalidate()
revalidate
in class JComponent
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
firePropertyChange
in class JComponent
public void firePropertyChange(String propertyName, byte oldValue, byte newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, char oldValue, char newValue)
firePropertyChange
in class JComponent
public void firePropertyChange(String propertyName, double oldValue, double newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, float oldValue, float newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, long oldValue, long newValue)
firePropertyChange
in class Component
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
firePropertyChange
in class Component
public void firePropertyChange(String propertyName, short oldValue, short newValue)
firePropertyChange
in class Component
public void repaint()
public void repaint(int x, int y, int width, int height)
public void repaint(long tm)
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.