|
||||||||||
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.JPanel com.dlsc.flexgantt.swing.layer.timeline.DefaultTimelineObjectRenderer com.dlsc.flexgantt.swing.layer.timeline.DefaultActivityObjectRenderer
public class DefaultActivityObjectRenderer
A renderer for timeline objects that implement the 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 FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 |
Constructor Summary | |
---|---|
DefaultActivityObjectRenderer()
Constructs a new renderer and sets its (text) foreground color to BLACK and its font to "Helvetica, BOLD, 9". |
Method Summary | |
---|---|
protected IActivityObject |
getActivityObject()
Returns the activity object that is currently being rendered. |
java.awt.Color |
getPercentageFillColor1()
Returns the first fill color used for drawing a gradient in the background of the activity object. |
java.awt.Color |
getPercentageFillColor2()
Returns the second fill color used for drawing a gradient in the background of the activity object. |
java.awt.Component |
getTimelineObjectRendererComponent(TimelineObjectLayer layer,
java.lang.Object node,
java.lang.Object timelineObject,
boolean selected,
boolean hasFocus,
boolean highlighted,
int row)
Returns a component that will be used to renderer the given timeline object. |
protected void |
paintActivityContent(java.awt.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(java.awt.Graphics g)
Adds visual feedback to an activity if it owns the focus. |
void |
setPercentageFillColor1(java.awt.Color color)
Sets the first fill color used for drawing a gradient in the background of the activity object. |
void |
setPercentageFillColor2(java.awt.Color color)
Sets the second fill color used for drawing a gradient in the background of the activity object. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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, update |
Methods inherited from class java.awt.Container |
---|
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, transferFocusBackward, transferFocusDownCycle, validateTree |
Methods inherited from class java.awt.Component |
---|
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, hide, 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, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultActivityObjectRenderer()
Method Detail |
---|
public java.awt.Component getTimelineObjectRendererComponent(TimelineObjectLayer layer, java.lang.Object node, java.lang.Object timelineObject, boolean selected, boolean hasFocus, boolean highlighted, int row)
ITimelineObjectRenderer
getTimelineObjectRendererComponent
in interface ITimelineObjectRenderer
getTimelineObjectRendererComponent
in class DefaultTimelineObjectRenderer
layer
- the layer in which the timeline object will be renderednode
- the tree node that 'owns' the timeline objecttimelineObject
- the actual timeline object that requires visualizationselected
- 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 drawn
protected void paintActivityContent(java.awt.Graphics g)
paintActivityContent
in class DefaultTimelineObjectRenderer
g
- the graphics context into which to drawDefaultTimelineObjectRenderer.paintActivityBorder(Graphics)
,
DefaultTimelineObjectRenderer.paintActivityShadow(Graphics)
protected void paintActivityFocus(java.awt.Graphics g)
DefaultTimelineObjectRenderer
paintActivityFocus
in class DefaultTimelineObjectRenderer
g
- the graphics context into which to drawpublic java.awt.Color getPercentageFillColor1()
public void setPercentageFillColor1(java.awt.Color color)
color
- the first color used for filling the background with a
gradientpublic java.awt.Color getPercentageFillColor2()
public void setPercentageFillColor2(java.awt.Color color)
color
- the second color used for filling the background with a
gradientprotected IActivityObject getActivityObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |