com.dlsc.flexgantt.swing.layer.timeline

## Class DefaultTimelineObjectRenderer

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - javax.swing.JComponent
      - - javax.swing.JPanel
        - - com.dlsc.flexgantt.swing.layer.timeline.DefaultTimelineObjectRenderer

- All Implemented Interfaces:
    ITimelineObjectRenderer, IRenderer, ImageObserver, MenuContainer, Serializable, Accessible
  Direct Known Subclasses:
    DefaultActivityObjectRenderer

      public class DefaultTimelineObjectRenderer
      extends JPanel
      implements ITimelineObjectRenderer

  The default timeline object renderer implementation draws a bar with rounded corners and fills its background with a smooth gradient paint. The renderer allows the rounded corners to be turned off and the two colors used for filling the gradient background can be changed as well (different colors are supported for selected, focused, or highlighted timeline objects). The renderer also adds a shadow to each timeline object. The offset of this shadow can be changed, too.

  Due to the fact that this renderer uses several Java2D features it is not the fastest one that can be written. Less fancy renderers should be even faster. Applications that need to render larger volumes of timeline objects should consider writing their own and slimmed down version of a timeline object renderer.

  Since:
    1.0
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann
  See Also:
    `LayerContainer.setTimelineObjectRenderer(Class, ITimelineObjectRenderer)`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.swing.JPanel

      `JPanel.AccessibleJPanel`

    - ### Nested classes/interfaces inherited from class javax.swing.JComponent

      `JComponent.AccessibleJComponent`

    - ### Nested classes/interfaces inherited from class java.awt.Container

      `Container.AccessibleAWTContainer`

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy`

  - ### Field Summary

    - ### Fields inherited from class javax.swing.JComponent

      `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

      `accessibleContext, 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

    Constructors
    Constructor and Description
    `DefaultTimelineObjectRenderer()` Constructs a new renderer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.
    `Color` | `getActivityFillColor1()` Returns the first color that will be used for filling the background of the timeline object with a gradient paint.
    `Color` | `getActivityFillColor2()` Returns the second color that will be used for filling the background of the timeline object with a gradient paint.
    `Color` | `getActivityLineColor()` Returns the line color that will be used for drawing the border of a timeline object if it is an activity (different start and end times).
    `int` | `getBarHeight()` Returns the height that will be used for the bar that will represent an activity timeline object.
    `int` | `getDiamondSize()` Returns the size of the event diamons.
    `Color` | `getEventFillColor1()` Returns the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is an event (same start and end time).
    `Color` | `getEventFillColor2()` Returns the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is an event (same start and end time).
    `Color` | `getEventLineColor()` Returns the line color that will be used for drawing the border of a timeline object in situations where the object is an event (same start and end time).
    `Color` | `getFocusFillColor1()` Returns the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object has the focus.
    `Color` | `getFocusFillColor2()` Returns the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object has the focus.
    `Color` | `getFocusLineColor()` Returns the line color that will be used for drawing the border of a timeline object in situations where the object has the focus.
    `Color` | `getHighlightFillColor1()` Returns the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is highlighted.
    `Color` | `getHighlightFillColor2()` Returns the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is highlighted.
    `Color` | `getHighlightLineColor()` Returns the line color that will be used for drawing the border of a timeline object in situations where the object is highlighted.
    `protected IGanttChartModel` | `getModel()` Returns the model that provided the currently rendered timeline object.
    `protected Object` | `getNode()` Returns the hierarchy (tree) node of the row in which the currently rendered timeline object is located.
    `Color` | `getParentFillColor1()` Returns the first background color used for those timeline objects that are parent timeline objects (own children timeline objects).
    `Color` | `getParentFillColor2()` Returns the second background color used for those timeline objects that are parent timeline objects (own children timeline objects).
    `Color` | `getParentLineColor()` Returns the line color used for those timeline objects that are parent timeline objects (own children timeline objects).
    `Color` | `getPastFillColor1()` Returns the first color used for filling the background of an activity when the activity is located in the past (earlier than time now).
    `Color` | `getPastFillColor2()` Returns the second color used for filling the background of an activity when the activity is located in the past (earlier than time now).
    `Color` | `getResizeHandleColor()` Returns the color used for the resize handles.
    `Color` | `getSelectionFillColor1()` Returns the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is selected.
    `Color` | `getSelectionFillColor2()` Returns the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is selected.
    `Color` | `getSelectionLineColor()` Sets the line color that will be used for drawing the border of a timeline object in situations where the object is selected.
    `protected Object` | `getTimelineObject()` Returns the timeline object that is currently being rendered.
    `protected TimelineObjectLayer` | `getTimelineObjectLayer()` Returns the timeline object layer where the current rendering operation takes place.
    `protected TimelineObjectPath` | `getTimelineObjectPath()` Returns the path to the currently rendered timeline 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.
    `Insets` | `getTimelineObjectRendererInsets(int x, int y, int width, int height)` Returns the insets of the object renderer.
    `boolean` | `hasFocus()` Determines whether the currently painted timeline object has the focus or not.
    `void` | `invalidate()` Overriden for performance reasons.
    `protected boolean` | `isDurationChangeable()` Checks the `IEditTimelineObjectPolicy` to see if the duration of the currently rendered timeline object can be changed.
    `protected boolean` | `isEvent()` Determines whether the currently rendered timeline object represents an event.
    `boolean` | `isGlossy()` Determines if the bar will be drawn with a glossy effect.
    `boolean` | `isHighlighted()` Determines whether the timeline object should be rendered in its highlighted state or not.
    `boolean` | `isParent()` Determines whether the currently rendered timeline object is a parent timeline object, meaning that it contains children timeline objects (also called summary timeline object, compound timeline object).
    `boolean` | `isRoundedCorners()` Determines whether the bars of activity timeline objects will be drawn with rounded corners or not.
    `protected boolean` | `isSelected()` Determines if the rendered timeline object is currently selected.
    `protected boolean` | `isStartTimeChangeable()` Checks the `IEditTimelineObjectPolicy` to see if the start time of the currently rendered timeline object can be changed.
    `boolean` | `isVisible()` Overriden in order to fix a bug in AWT, which causes the cursor to flicker during drag and drop operations
    `boolean` | `isVisualizingPastTime()` Determines whether the renderer will draw the timeline object differently if the object is located in the past (e.g. gray out).
    `protected void` | `paintActivityBorder(Graphics g)` Paints the border of the activity object.
    `protected void` | `paintActivityContent(Graphics g)` Renders the timeline object if it is an activity (different start and end time = duration).
    `protected void` | `paintActivityFocus(Graphics g)` Adds visual feedback to an activity if it owns the focus.
    `protected void` | `paintComponent(Graphics g)`
    `protected void` | `paintEvent(Graphics g)` Renders the timeline object if it is an event (same start and end time).
    `protected void` | `paintParent(Graphics g)` Renders the timeline object if it is a parent timeline object, meaning that it contains child timeline objects.
    `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` | `setActivityFillColor1(Color color)` Sets the first color that will be used for filling the background of the timeline object with a gradient paint.
    `void` | `setActivityFillColor2(Color color)` Sets the second color that will be used for filling the background of the timeline object with a gradient paint.
    `void` | `setActivityLineColor(Color color)` Sets the line color that will be used for drawing the border of a timeline object if it is an activity (different start and end times).
    `void` | `setBarHeight(int height)` Sets the height that will be used for the bar that will represent an activity timeline object.
    `void` | `setDiamondSize(int size)` Sets the size of the event diamonds.
    `void` | `setEventFillColor1(Color color)` Sets the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is an event (same start and end time).
    `void` | `setEventFillColor2(Color color)` Sets the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is an event (same start and end time).
    `void` | `setEventLineColor(Color color)` Sets the line color that will be used for drawing the border of a timeline object in situations where the object is an event (same start and end time).
    `void` | `setFocusFillColor1(Color color)` Sets the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object has the focus.
    `void` | `setFocusFillColor2(Color color)` Sets the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object has the focus.
    `void` | `setFocusLineColor(Color color)` Sets the line color that will be used for drawing the border of a timeline object in situations where the object has the focus.
    `void` | `setGlossy(boolean glossy)` Specifies if the bar will be drawn with a glossy effect.
    `void` | `setHighlightFillColor1(Color color)` Sets the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is highlighted.
    `void` | `setHighlightFillColor2(Color color)` Sets the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is highlighted.
    `void` | `setHighlightLineColor(Color color)` Sets the line color that will be used for drawing the border of a timeline object in situations where the object is highlighted.
    `void` | `setParentFillColor1(Color color)` Sets the first background color used for those timeline objects that are parent timeline objects (own children timeline objects).
    `void` | `setParentFillColor2(Color color)` Sets the second background color used for those timeline objects that are parent timeline objects (own children timeline objects).
    `void` | `setParentLineColor(Color color)` Sets the line color used for those timeline objects that are parent timeline objects (own children timeline objects).
    `void` | `setPastFillColor1(Color color)` Sets the first color used for filling the background of an activity when the activity is located in the past (earlier than time now).
    `void` | `setPastFillColor2(Color color)` Sets the second color used for filling the background of an activity when the activity is located in the past (earlier than time now).
    `void` | `setResizeHandleColor(Color color)` Sets the color used for the resize handles.
    `void` | `setRoundedCorners(boolean b)` Specifies whether the bars of activity timeline objects will be drawn with rounded corners or not.
    `void` | `setSelectionFillColor1(Color color)` Sets the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is selected.
    `void` | `setSelectionFillColor2(Color color)` Sets the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is selected.
    `void` | `setSelectionLineColor(Color color)` Sets the line color that will be used for drawing the border of a timeline object in situations where the object is selected.
    `void` | `setVisualizingPastTime(boolean b)` Specifies whether the renderer will draw the timeline object differently if the object is located in the past (e.g. gray out).
    `void` | `validate()` Overriden for performance reasons.

    - ### 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, 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, 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, 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, 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, transferFocusUpCycle`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultTimelineObjectRenderer

          public DefaultTimelineObjectRenderer()

      Constructs a new renderer.
      Since:
        1.0

  - ### Method Detail

    - #### getTimelineObjectRendererComponent

          public Component getTimelineObjectRendererComponent(TimelineObjectLayer layer,
                                                              TimelineObjectPath path,
                                                              boolean selected,
                                                              boolean hasFocus,
                                                              boolean highlighted,
                                                              int row)

      Description copied from interface: `ITimelineObjectRenderer`
      Returns a component that will be used to renderer the given timeline object.
      Specified by:
        `getTimelineObjectRendererComponent` in interface `ITimelineObjectRenderer`
      Parameters:
        `layer` - the layer in which the timeline object will be rendered
        `path` - the path to the timeline object that gets rendered
        `selected` - if TRUE the object is currently selected and the rendering needs to express that
        `hasFocus` - if TRUE the focus is currently on the timeline object and the rendering needs to express that
        `highlighted` - 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
      Returns:
        the component used for rendering the given object

    - #### getTimelineObjectRendererInsets

          public Insets getTimelineObjectRendererInsets(int x,
                                                        int y,
                                                        int width,
                                                        int height)

      Description copied from interface: `ITimelineObjectRenderer`
      Returns the insets of the object renderer. The insets are important if the renderer doesn't use the entire rectangle that it could use (for example a bar that doesn't use the entire height of the row, which is quite common, see also `DefaultActivityObjectRenderer`).
      Specified by:
        `getTimelineObjectRendererInsets` in interface `ITimelineObjectRenderer`
      Parameters:
        `x` - the x-coordinate of the bounds that will be assigned to the renderer component
        `y` - the y-coordinate of the bounds that will be assigned to the renderer component
        `width` - the width of the bounds that will be assigned to the renderer component
        `height` - the height of the bounds that will be assigned to the renderer component
      Returns:
        the renderers insets (unused space above, below, to the left, to the right)

    - #### paintComponent

          protected void paintComponent(Graphics g)

      Overrides:
        `paintComponent` in class `JComponent`

    - #### paintParent

          protected void paintParent(Graphics g)

      Renders the timeline object if it is a parent timeline object, meaning that it contains child timeline objects.
      Parameters:
        `g` - the graphics context into which to draw
      Since:
        1.0

    - #### paintActivityFocus

          protected void paintActivityFocus(Graphics g)

      Adds visual feedback to an activity if it owns the focus.
      Parameters:
        `g` - the graphics context into which to draw
      Since:
        1.0

    - #### paintEvent

          protected void paintEvent(Graphics g)

      Renders the timeline object if it is an event (same start and end time).
      Parameters:
        `g` - the graphics context into which to draw
      Since:
        1.0

    - #### paintActivityContent

          protected void paintActivityContent(Graphics g)

      Renders the timeline object if it is an activity (different start and end time = duration).
      Parameters:
        `g` - the graphics context into which to draw
      Since:
        1.0
      See Also:
        `paintActivityBorder(Graphics)`

    - #### paintActivityBorder

          protected void paintActivityBorder(Graphics g)

      Paints the border of the activity object.
      Parameters:
        `g` - the graphics context into which to draw
      Since:
        1.0
      See Also:
        `setRoundedCorners(boolean)`

    - #### setGlossy

          public void setGlossy(boolean glossy)

      Specifies if the bar will be drawn with a glossy effect.
      Parameters:
        `glossy` - if TRUE the bar will appear glossy
      Since:
        2.0

    - #### isGlossy

          public boolean isGlossy()

      Determines if the bar will be drawn with a glossy effect.
      Returns:
        TRUE if the bar will appear glossy
      Since:
        2.0

    - #### getBarHeight

          public int getBarHeight()

      Returns the height that will be used for the bar that will represent an activity timeline object.
      Returns:
        the height of the bar
      Since:
        1.0

    - #### setBarHeight

          public void setBarHeight(int height)

      Sets the height that will be used for the bar that will represent an activity timeline object.
      Parameters:
        `height` - the height of the bar
      Since:
        1.0

    - #### getActivityFillColor1

          public Color getActivityFillColor1()

      Returns the first color that will be used for filling the background of the timeline object with a gradient paint.
      Returns:
        the first fill color for the gradient background
      Since:
        1.0

    - #### setActivityFillColor1

          public void setActivityFillColor1(Color color)

      Sets the first color that will be used for filling the background of the timeline object with a gradient paint.
      Parameters:
        `color` - the first fill color for the gradient background
      Since:
        1.0

    - #### getActivityFillColor2

          public Color getActivityFillColor2()

      Returns the second color that will be used for filling the background of the timeline object with a gradient paint.
      Returns:
        the second fill color for the gradient background
      Since:
        1.0

    - #### setActivityFillColor2

          public void setActivityFillColor2(Color color)

      Sets the second color that will be used for filling the background of the timeline object with a gradient paint.
      Parameters:
        `color` - the second fill color for the gradient background
      Since:
        1.0

    - #### getFocusFillColor1

          public Color getFocusFillColor1()

      Returns the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object has the focus.
      Returns:
        the first fill color for the gradient background of focused timeline objects
      Since:
        1.0

    - #### setFocusFillColor1

          public void setFocusFillColor1(Color color)

      Sets the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object has the focus.
      Parameters:
        `color` - the first fill color for the gradient background of focused timeline objects
      Since:
        1.0

    - #### getFocusFillColor2

          public Color getFocusFillColor2()

      Returns the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object has the focus.
      Returns:
        the second fill color for the gradient background of focused timeline objects
      Since:
        1.0

    - #### setFocusFillColor2

          public void setFocusFillColor2(Color color)

      Sets the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object has the focus.
      Parameters:
        `color` - the second fill color for the gradient background of focused timeline objects
      Since:
        1.0

    - #### getFocusLineColor

          public Color getFocusLineColor()

      Returns the line color that will be used for drawing the border of a timeline object in situations where the object has the focus.
      Returns:
        the line color for the focused timeline object
      Since:
        1.0

    - #### setFocusLineColor

          public void setFocusLineColor(Color color)

      Sets the line color that will be used for drawing the border of a timeline object in situations where the object has the focus.
      Parameters:
        `color` - the line color for the focused timeline object
      Since:
        1.0

    - #### getHighlightFillColor1

          public Color getHighlightFillColor1()

      Returns the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is highlighted.
      Returns:
        the first fill color for the gradient background of highlighted timeline objects
      Since:
        1.0

    - #### setHighlightFillColor1

          public void setHighlightFillColor1(Color color)

      Sets the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is highlighted.
      Parameters:
        `color` - the first fill color for the gradient background of highlighted timeline objects
      Since:
        1.0

    - #### getHighlightFillColor2

          public Color getHighlightFillColor2()

      Returns the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is highlighted.
      Returns:
        the second fill color for the gradient background of highlighted timeline objects
      Since:
        1.0

    - #### setHighlightFillColor2

          public void setHighlightFillColor2(Color color)

      Sets the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is highlighted.
      Parameters:
        `color` - the second fill color for the gradient background of highlighted timeline objects
      Since:
        1.0

    - #### getHighlightLineColor

          public Color getHighlightLineColor()

      Returns the line color that will be used for drawing the border of a timeline object in situations where the object is highlighted.
      Returns:
        the line color for the highlighted timeline object
      Since:
        1.0

    - #### setHighlightLineColor

          public void setHighlightLineColor(Color color)

      Sets the line color that will be used for drawing the border of a timeline object in situations where the object is highlighted.
      Parameters:
        `color` - the line color for the highlighted timeline object
      Since:
        1.0

    - #### getActivityLineColor

          public Color getActivityLineColor()

      Returns the line color that will be used for drawing the border of a timeline object if it is an activity (different start and end times).
      Returns:
        the line color for the activity timeline object
      Since:
        1.0

    - #### setActivityLineColor

          public void setActivityLineColor(Color color)

      Sets the line color that will be used for drawing the border of a timeline object if it is an activity (different start and end times).
      Parameters:
        `color` - the line color for the activity timeline object
      Since:
        1.0

    - #### getSelectionFillColor1

          public Color getSelectionFillColor1()

      Returns the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is selected.
      Returns:
        the first fill color for the gradient background of selected timeline objects
      Since:
        1.0

    - #### setSelectionFillColor1

          public void setSelectionFillColor1(Color color)

      Sets the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is selected.
      Parameters:
        `color` - the first fill color for the gradient background of selected timeline objects
      Since:
        1.0

    - #### getSelectionFillColor2

          public Color getSelectionFillColor2()

      Returns the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is selected.
      Returns:
        the second fill color for the gradient background of selected timeline objects
      Since:
        1.0

    - #### setSelectionFillColor2

          public void setSelectionFillColor2(Color color)

      Sets the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is selected.
      Parameters:
        `color` - the second fill color for the gradient background of selected timeline objects
      Since:
        1.0

    - #### getSelectionLineColor

          public Color getSelectionLineColor()

      Sets the line color that will be used for drawing the border of a timeline object in situations where the object is selected.
      Returns:
        the line color for the highlighted timeline object
      Since:
        1.0

    - #### setSelectionLineColor

          public void setSelectionLineColor(Color color)

      Sets the line color that will be used for drawing the border of a timeline object in situations where the object is selected.
      Parameters:
        `color` - the line color for the highlighted timeline object
      Since:
        1.0

    - #### getEventFillColor1

          public Color getEventFillColor1()

      Returns the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is an event (same start and end time).
      Returns:
        the first fill color for the gradient background of timeline objects that are events
      Since:
        1.0

    - #### setEventFillColor1

          public void setEventFillColor1(Color color)

      Sets the first color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is an event (same start and end time).
      Parameters:
        `color` - the first fill color for the gradient background of timeline objects that are events
      Since:
        1.0

    - #### getEventFillColor2

          public Color getEventFillColor2()

      Returns the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is an event (same start and end time).
      Returns:
        the second fill color for the gradient background of timeline objects that are events
      Since:
        1.0

    - #### setEventFillColor2

          public void setEventFillColor2(Color color)

      Sets the second color that will be used for filling the background of the timeline object with a gradient paint in situations where the object is an event (same start and end time).
      Parameters:
        `color` - the second fill color for the gradient background of timeline objects that are events
      Since:
        1.0

    - #### setEventLineColor

          public void setEventLineColor(Color color)

      Sets the line color that will be used for drawing the border of a timeline object in situations where the object is an event (same start and end time).
      Parameters:
        `color` - the line color for the event timeline object
      Since:
        1.0

    - #### getEventLineColor

          public Color getEventLineColor()

      Returns the line color that will be used for drawing the border of a timeline object in situations where the object is an event (same start and end time).
      Returns:
        the line color for the event timeline object
      Since:
        1.0

    - #### isEvent

          protected boolean isEvent()

      Determines whether the currently rendered timeline object represents an event.
      Returns:
        TRUE if the timeline object being rendered is an event
      Since:
        1.0

    - #### isParent

          public boolean isParent()

      Determines whether the currently rendered timeline object is a parent timeline object, meaning that it contains children timeline objects (also called summary timeline object, compound timeline object).
      Returns:
        TRUE if the timeline object rendered is a parent timeline object
      Since:
        1.0

    - #### hasFocus

          public boolean hasFocus()

      Determines whether the currently painted timeline object has the focus or not. To be consistent with the rest of the API this method should have been called `isFocused()` but the user could get confused with the `hasFocus()` method of the superclass.
      Overrides:
        `hasFocus` in class `Component`
      Returns:
        TRUE if the currently painted timeline object has the focus
      Since:
        1.0

    - #### getTimelineObjectLayer

          protected TimelineObjectLayer getTimelineObjectLayer()

      Returns the timeline object layer where the current rendering operation takes place.
      Returns:
        the timeline object layer
      Since:
        1.0

    - #### getModel

          protected IGanttChartModel getModel()

      Returns the model that provided the currently rendered timeline object.
      Returns:
        the data source from which the timeline object originated
      Since:
        1.0

    - #### getNode

          protected Object getNode()

      Returns the hierarchy (tree) node of the row in which the currently rendered timeline object is located.
      Returns:
        the owning hierarchy (tree) node of the timeline object
      Since:
        1.0

    - #### getTimelineObject

          protected Object getTimelineObject()

      Returns the timeline object that is currently being rendered.
      Returns:
        the rendered timeline object
      Since:
        1.0

    - #### isSelected

          protected boolean isSelected()

      Determines if the rendered timeline object is currently selected.
      Returns:
        TRUE if the timeline object being rendered is selected
      Since:
        1.0

    - #### isHighlighted

          public boolean isHighlighted()

      Determines whether the timeline object should be rendered in its highlighted state or not. Highlighting is used for making timeline objects stand out visually to indicate to the user that they require his attention. The highlighting flag gets toggled via a thread managed by the `LayerContainer`. This thread runs whenever at least one timeline object is highlighted.
      Returns:
        TRUE if the timeline object is highlighted
      Since:
        1.0
      See Also:
        `LayerContainer.addHighlightedObjects(java.util.Collection)`, `LayerContainer.isHighlighted(com.dlsc.flexgantt.model.gantt.TimelineObjectPath)`

    - #### isVisualizingPastTime

          public boolean isVisualizingPastTime()

      Determines whether the renderer will draw the timeline object differently if the object is located in the past (e.g. gray out).
      Returns:
        TRUE if timeline objects located in the past are drawn in a different way
      Since:
        1.0

    - #### setVisualizingPastTime

          public void setVisualizingPastTime(boolean b)

      Specifies whether the renderer will draw the timeline object differently if the object is located in the past (e.g. gray out).
      Parameters:
        `b` - TRUE timeline objects located in the past will be drawn in a different way
      Since:
        1.0

    - #### isRoundedCorners

          public boolean isRoundedCorners()

      Determines whether the bars of activity timeline objects will be drawn with rounded corners or not.
      Returns:
        TRUE if the activity bars will feature rounded corners
      Since:
        1.0

    - #### setRoundedCorners

          public void setRoundedCorners(boolean b)

      Specifies whether the bars of activity timeline objects will be drawn with rounded corners or not.
      Parameters:
        `b` - if TRUE the activity bars will feature rounded corners
      Since:
        1.0

    - #### getResizeHandleColor

          public Color getResizeHandleColor()

      Returns the color used for the resize handles.
      Returns:
        the handle color
      Since:
        1.0

    - #### setResizeHandleColor

          public void setResizeHandleColor(Color color)

      Sets the color used for the resize handles.
      Parameters:
        `color` - the handle color
      Since:
        1.0

    - #### getDiamondSize

          public int getDiamondSize()

      Returns the size of the event diamons.
      Returns:
        the diamond size
      Since:
        1.0

    - #### setDiamondSize

          public void setDiamondSize(int size)

      Sets the size of the event diamonds.
      Parameters:
        `size` - the diamond size
      Since:
        1.0

    - #### getParentFillColor1

          public Color getParentFillColor1()

      Returns the first background color used for those timeline objects that are parent timeline objects (own children timeline objects).
      Returns:
        the first parent background color
      Since:
        1.0
      See Also:
        `IGanttChartModel.isParentTimelineObject(Object)`

    - #### setParentFillColor1

          public void setParentFillColor1(Color color)

      Sets the first background color used for those timeline objects that are parent timeline objects (own children timeline objects).
      Parameters:
        `color` - the first parent background color
      Since:
        1.0
      See Also:
        `IGanttChartModel.isParentTimelineObject(Object)`

    - #### getParentFillColor2

          public Color getParentFillColor2()

      Returns the second background color used for those timeline objects that are parent timeline objects (own children timeline objects).
      Returns:
        the second parent background color
      Since:
        1.0
      See Also:
        `IGanttChartModel.isParentTimelineObject(Object)`

    - #### setParentFillColor2

          public void setParentFillColor2(Color color)

      Sets the second background color used for those timeline objects that are parent timeline objects (own children timeline objects).
      Parameters:
        `color` - the second parent background color
      Since:
        1.0
      See Also:
        `IGanttChartModel.isParentTimelineObject(Object)`

    - #### getParentLineColor

          public Color getParentLineColor()

      Returns the line color used for those timeline objects that are parent timeline objects (own children timeline objects).
      Returns:
        the parent line color
      Since:
        1.0
      See Also:
        `IGanttChartModel.isParentTimelineObject(Object)`

    - #### setParentLineColor

          public void setParentLineColor(Color color)

      Sets the line color used for those timeline objects that are parent timeline objects (own children timeline objects).
      Parameters:
        `color` - the parent line color
      Since:
        1.0
      See Also:
        `IGanttChartModel.isParentTimelineObject(Object)`

    - #### getPastFillColor1

          public Color getPastFillColor1()

      Returns the first color used for filling the background of an activity when the activity is located in the past (earlier than time now).
      Returns:
        the first background color for past activities
      Since:
        1.0

    - #### setPastFillColor1

          public void setPastFillColor1(Color color)

      Sets the first color used for filling the background of an activity when the activity is located in the past (earlier than time now).
      Parameters:
        `color` - the first background color for past activities
      Since:
        1.0

    - #### getPastFillColor2

          public Color getPastFillColor2()

      Returns the second color used for filling the background of an activity when the activity is located in the past (earlier than time now).
      Returns:
        the second background color for past activities
      Since:
        1.0

    - #### setPastFillColor2

          public void setPastFillColor2(Color color)

      Sets the second color used for filling the background of an activity when the activity is located in the past (earlier than time now).
      Parameters:
        `color` - the second background color for past activities
      Since:
        1.0

    - #### isStartTimeChangeable

          protected boolean isStartTimeChangeable()

      Checks the `IEditTimelineObjectPolicy` to see if the start time of the currently rendered timeline object can be changed. This is important to know when drawing resize handles. These can only be added on the left edge of the eventline object when its duration AND its start time can be changed.
      Returns:
        TRUE if the start time of the timeline object can be changed
      Since:
        1.0

    - #### isDurationChangeable

          protected boolean isDurationChangeable()

      Checks the `IEditTimelineObjectPolicy` to see if the duration of the currently rendered timeline object can be changed. This is important to know when drawing resize handles.
      Returns:
        TRUE if the duration of the timeline object can be changed
      Since:
        1.0

    - #### getTimelineObjectPath

          protected TimelineObjectPath getTimelineObjectPath()

      Returns the path to the currently rendered timeline object.
      Returns:
        a path to the given timeline object
      Since:
        1.1

    - #### validate

          public void validate()

      Overriden for performance reasons.
      Overrides:
        `validate` in class `Container`
      Since:
        1.0

    - #### invalidate

          public void invalidate()

      Overriden for performance reasons.
      Overrides:
        `invalidate` in class `Container`
      Since:
        1.0

    - #### revalidate

          public void revalidate()

      Overriden for performance reasons.
      Overrides:
        `revalidate` in class `JComponent`
      Since:
        1.0

    - #### firePropertyChange

          public void firePropertyChange(String propertyName,
                                         boolean oldValue,
                                         boolean newValue)

      Overriden for performance reasons.
      Overrides:
        `firePropertyChange` in class `JComponent`
      Since:
        1.0

    - #### firePropertyChange

          public void firePropertyChange(String propertyName,
                                         byte oldValue,
                                         byte newValue)

      Overriden for performance reasons.
      Overrides:
        `firePropertyChange` in class `Component`
      Since:
        1.0

    - #### firePropertyChange

          public void firePropertyChange(String propertyName,
                                         char oldValue,
                                         char newValue)

      Overriden for performance reasons.
      Overrides:
        `firePropertyChange` in class `JComponent`
      Since:
        1.0

    - #### firePropertyChange

          public void firePropertyChange(String propertyName,
                                         double oldValue,
                                         double newValue)

      Overriden for performance reasons.
      Overrides:
        `firePropertyChange` in class `Component`
      Since:
        1.0

    - #### firePropertyChange

          public void firePropertyChange(String propertyName,
                                         float oldValue,
                                         float newValue)

      Overriden for performance reasons.
      Overrides:
        `firePropertyChange` in class `Component`
      Since:
        1.0

    - #### firePropertyChange

          public void firePropertyChange(String propertyName,
                                         long oldValue,
                                         long newValue)

      Overriden for performance reasons.
      Overrides:
        `firePropertyChange` in class `Component`
      Since:
        1.0

    - #### firePropertyChange

          protected void firePropertyChange(String propertyName,
                                            Object oldValue,
                                            Object newValue)

      Overriden for performance reasons.
      Overrides:
        `firePropertyChange` in class `Component`
      Since:
        1.0

    - #### firePropertyChange

          public void firePropertyChange(String propertyName,
                                         short oldValue,
                                         short newValue)

      Overriden for performance reasons.
      Overrides:
        `firePropertyChange` in class `Component`
      Since:
        1.0

    - #### repaint

          public void repaint()

      Overriden for performance reasons.
      Overrides:
        `repaint` in class `Component`
      Since:
        1.0

    - #### repaint

          public void repaint(int x,
                              int y,
                              int width,
                              int height)

      Overriden for performance reasons.
      Overrides:
        `repaint` in class `Component`
      Since:
        1.0

    - #### repaint

          public void repaint(long tm)

      Overriden for performance reasons.
      Overrides:
        `repaint` in class `Component`
      Since:
        1.0

    - #### isVisible

          public boolean isVisible()

      Overriden in order to fix a bug in AWT, which causes the cursor to flicker during drag and drop operations. *
      Overrides:
        `isVisible` in class `Component`
      Since:
        1.1

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.