public class DefaultActivityObjectRenderer extends DefaultTimelineObjectRenderer
IActivityObject
interface. These activities have an attribute called 'percentage complete'
that expresses how much of an activity has been completed. The renderer reads
this attribute and fills the background of a standard representation of a
timeline object with a special color. The amount filled represents the
percentage complete value.LayerContainer.setTimelineObjectRenderer(Class, ITimelineObjectRenderer),
Serialized FormJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategylistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
DefaultActivityObjectRenderer()
Constructs a new renderer and sets its (text) foreground color to BLACK
and its font to "Helvetica, BOLD, 9".
|
| Modifier and Type | Method and Description |
|---|---|
protected IActivityObject |
getActivityObject()
Returns the activity object that is currently being rendered.
|
Color |
getPercentageFillColor1()
Returns the first fill color used for drawing a gradient in the
background of the activity object.
|
Color |
getPercentageFillColor2()
Returns the second fill color used for drawing a gradient in the
background of the activity object.
|
Component |
getTimelineObjectRendererComponent(TimelineObjectLayer layer,
TimelineObjectPath path,
boolean selected,
boolean hasFocus,
boolean highlighted,
int row)
Returns a component that will be used to renderer the given timeline
object.
|
protected void |
paintActivityContent(Graphics g)
Overrides the super method in order to fill the background of the bar
with a special fill color based on the percentage complete value of the
activity timeline object.
|
protected void |
paintActivityFocus(Graphics g)
Adds visual feedback to an activity if it owns the focus.
|
void |
setPercentageFillColor1(Color color)
Sets the first fill color used for drawing a gradient in the background
of the activity object.
|
void |
setPercentageFillColor2(Color color)
Sets the second fill color used for drawing a gradient in the background
of the activity object.
|
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActivityFillColor1, getActivityFillColor2, getActivityLineColor, getBarHeight, getDiamondSize, getEventFillColor1, getEventFillColor2, getEventLineColor, getFocusFillColor1, getFocusFillColor2, getFocusLineColor, getHighlightFillColor1, getHighlightFillColor2, getHighlightLineColor, getModel, getNode, getParentFillColor1, getParentFillColor2, getParentLineColor, getPastFillColor1, getPastFillColor2, getResizeHandleColor, getSelectionFillColor1, getSelectionFillColor2, getSelectionLineColor, getTimelineObject, getTimelineObjectLayer, getTimelineObjectPath, getTimelineObjectRendererInsets, hasFocus, invalidate, isDurationChangeable, isEvent, isGlossy, isHighlighted, isParent, isRoundedCorners, isSelected, isStartTimeChangeable, isVisible, isVisualizingPastTime, paintActivityBorder, paintComponent, paintEvent, paintParent, repaint, repaint, repaint, revalidate, setActivityFillColor1, setActivityFillColor2, setActivityLineColor, setBarHeight, setDiamondSize, setEventFillColor1, setEventFillColor2, setEventLineColor, setFocusFillColor1, setFocusFillColor2, setFocusLineColor, setGlossy, setHighlightFillColor1, setHighlightFillColor2, setHighlightLineColor, setParentFillColor1, setParentFillColor2, setParentLineColor, setPastFillColor1, setPastFillColor2, setResizeHandleColor, setRoundedCorners, setSelectionFillColor1, setSelectionFillColor2, setSelectionLineColor, setVisualizingPastTime, validategetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, 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, updateadd, 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, validateTreeaction, 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, 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, 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, transferFocusUpCyclepublic DefaultActivityObjectRenderer()
public Component getTimelineObjectRendererComponent(TimelineObjectLayer layer, TimelineObjectPath path, boolean selected, boolean hasFocus, boolean highlighted, int row)
ITimelineObjectRenderergetTimelineObjectRendererComponent in interface ITimelineObjectRenderergetTimelineObjectRendererComponent in class DefaultTimelineObjectRendererlayer - 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 thathasFocus - 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 drawnprotected void paintActivityContent(Graphics g)
paintActivityContent in class DefaultTimelineObjectRendererg - the graphics context into which to drawDefaultTimelineObjectRenderer.paintActivityBorder(Graphics)protected void paintActivityFocus(Graphics g)
DefaultTimelineObjectRendererpaintActivityFocus in class DefaultTimelineObjectRendererg - the graphics context into which to drawpublic Color getPercentageFillColor1()
public void setPercentageFillColor1(Color color)
color - the first color used for filling the background with a
gradientpublic Color getPercentageFillColor2()
public void setPercentageFillColor2(Color color)
color - the second color used for filling the background with a
gradientprotected IActivityObject getActivityObject()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.