|
||||||||||
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.JLabel com.dlsc.flexgantt.swing.timeline.DefaultEventlineObjectRenderer
public class DefaultEventlineObjectRenderer
The default renderer used for objects shown on the eventline. These objects
are returned by an instance of IEventlineModel
. Each of these
objects can have its own type. Different renderers based on that type can be
registered with the Gantt chart.
Eventline.getEventlineObjectRenderer(Class)
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLabel |
---|
javax.swing.JLabel.AccessibleJLabel |
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.JLabel |
---|
labelFor |
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 javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DefaultEventlineObjectRenderer()
Constructs a new renderer for eventline objects. |
Method Summary | |
---|---|
void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
Commented out for performance reasons. |
void |
firePropertyChange(java.lang.String propertyName,
byte oldValue,
byte newValue)
Commented out for performance reasons. |
void |
firePropertyChange(java.lang.String propertyName,
char oldValue,
char newValue)
Commented out for performance reasons. |
void |
firePropertyChange(java.lang.String propertyName,
double oldValue,
double newValue)
Commented out for performance reasons. |
void |
firePropertyChange(java.lang.String propertyName,
float oldValue,
float newValue)
Commented out for performance reasons. |
void |
firePropertyChange(java.lang.String propertyName,
long oldValue,
long newValue)
Commented out for performance reasons. |
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Commented out for performance reasons. |
void |
firePropertyChange(java.lang.String propertyName,
short oldValue,
short newValue)
Commented out for performance reasons. |
java.awt.Color |
getActivityFillColor1()
Returns the first color that will be used for filling the background of the timeline object with a gradient paint. |
java.awt.Color |
getActivityFillColor2()
Returns the second color that will be used for filling the background of the timeline object with a gradient paint. |
java.awt.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). |
java.awt.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). |
java.awt.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). |
protected Eventline |
getEventline()
Returns the eventline where the renderer gets used. |
java.awt.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). |
protected java.lang.Object |
getEventlineObject()
Returns the eventline object that is currently being painted by the renderer. |
java.awt.Component |
getEventlineRendererComponent(Eventline eventline,
java.lang.Object eventlineObject,
boolean selected,
boolean focus)
Returns a renderer component for the given eventline model object. |
java.awt.Insets |
getEventlineRendererInsets()
Returns the insets for the renderer. |
java.awt.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. |
java.awt.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. |
java.awt.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. |
protected IEventlineModel |
getModel()
Returns the eventline model that returned the eventline object currently being painted. |
java.awt.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). |
java.awt.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). |
java.awt.Color |
getResizeHandleColor()
Returns the color used for the resize handles. |
java.awt.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. |
java.awt.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. |
java.awt.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. |
boolean |
hasFocus()
Determines whether the rendered eventline object has the focus. |
void |
invalidate()
Commented out for performance reasons. |
protected boolean |
isDurationChangeable()
Checks the IEditEventlineObjectPolicy to see if the duration of
the currently rendered eventline object can be changed. |
protected boolean |
isEvent()
Determines whether the currently rendered timeline object represents an event. |
protected boolean |
isSelected()
Determines if the rendered eventline object is currently selected. |
protected boolean |
isStartTimeChangeable()
Checks the IEditEventlineObjectPolicy to see if the start time of
the currently rendered eventline object can be changed. |
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(java.awt.Graphics g)
Paints the border of the activity object. |
protected void |
paintActivityContent(java.awt.Graphics g)
Renders the timeline object if it is an activity (different start and end time = duration). |
protected void |
paintActivityFocus(java.awt.Graphics g)
Adds visual feedback to an activity if it owns the focus. |
protected void |
paintComponent(java.awt.Graphics g)
|
protected void |
paintEvent(java.awt.Graphics g)
Renders the timeline object if it is an event (same start and end time). |
void |
repaint()
Commented out for performance reasons. |
void |
repaint(int x,
int y,
int width,
int height)
Commented out for performance reasons. |
void |
repaint(long tm)
Commented out for performance reasons. |
void |
revalidate()
Commented out for performance reasons. |
void |
setActivityFillColor1(java.awt.Color color)
Sets the first color that will be used for filling the background of the timeline object with a gradient paint. |
void |
setActivityFillColor2(java.awt.Color color)
Sets the second color that will be used for filling the background of the timeline object with a gradient paint. |
void |
setActivityLineColor(java.awt.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 |
setEventFillColor1(java.awt.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(java.awt.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(java.awt.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(java.awt.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(java.awt.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(java.awt.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 |
setPastFillColor1(java.awt.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(java.awt.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(java.awt.Color color)
Sets the color used for the resize handles. |
void |
setSelectionFillColor1(java.awt.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(java.awt.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(java.awt.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()
Commented out for performance reasons. |
Methods inherited from class javax.swing.JLabel |
---|
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, 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, 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 DefaultEventlineObjectRenderer()
Method Detail |
---|
public java.awt.Component getEventlineRendererComponent(Eventline eventline, java.lang.Object eventlineObject, boolean selected, boolean focus)
IEventlineObjectRenderer
IEventlineModel
.
getEventlineRendererComponent
in interface IEventlineObjectRenderer
eventline
- the eventline user interface componenteventlineObject
- the object returned from the eventline data source (eventline
model)selected
- a flag signalling whether the eventline object is currently
selectedfocus
- a flag indicating whether the eventline object has the focus
public java.awt.Insets getEventlineRendererInsets()
IEventlineObjectRenderer
getEventlineRendererInsets
in interface IEventlineObjectRenderer
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
protected void paintEvent(java.awt.Graphics g)
g
- the graphics context into which to drawprotected void paintActivityContent(java.awt.Graphics g)
g
- the graphics context into which to drawpaintActivityBorder(Graphics)
protected void paintActivityFocus(java.awt.Graphics g)
g
- the graphics context into which to drawprotected boolean isStartTimeChangeable()
IEditEventlineObjectPolicy
to see if the start time of
the currently rendered eventline 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.
protected boolean isDurationChangeable()
IEditEventlineObjectPolicy
to see if the duration of
the currently rendered eventline object can be changed. This is important
to know when drawing resize handles.
protected void paintActivityBorder(java.awt.Graphics g)
g
- the graphics context into which to drawpublic boolean isVisualizingPastTime()
public void setVisualizingPastTime(boolean b)
b
- TRUE timeline objects located in the past will be drawn in a
different wayprotected Eventline getEventline()
protected java.lang.Object getEventlineObject()
public boolean hasFocus()
isFocused()
but
hasFocus()
is the Sun standard.
hasFocus
in class java.awt.Component
protected IEventlineModel getModel()
protected boolean isSelected()
public java.awt.Color getActivityFillColor1()
public void setActivityFillColor1(java.awt.Color color)
color
- the first fill color for the gradient backgroundpublic java.awt.Color getActivityFillColor2()
public void setActivityFillColor2(java.awt.Color color)
color
- the second fill color for the gradient backgroundpublic java.awt.Color getFocusFillColor1()
public void setFocusFillColor1(java.awt.Color color)
color
- the first fill color for the gradient background of focused
timeline objectspublic java.awt.Color getFocusFillColor2()
public void setFocusFillColor2(java.awt.Color color)
color
- the second fill color for the gradient background of focused
timeline objectspublic java.awt.Color getFocusLineColor()
public void setFocusLineColor(java.awt.Color color)
color
- the line color for the focused timeline objectpublic java.awt.Color getActivityLineColor()
public void setActivityLineColor(java.awt.Color color)
color
- the line color for the activity timeline objectpublic java.awt.Color getSelectionFillColor1()
public void setSelectionFillColor1(java.awt.Color color)
color
- the first fill color for the gradient background of selected
timeline objectspublic java.awt.Color getSelectionFillColor2()
public void setSelectionFillColor2(java.awt.Color color)
color
- the second fill color for the gradient background of selected
timeline objectspublic java.awt.Color getSelectionLineColor()
public void setSelectionLineColor(java.awt.Color color)
color
- the line color for the highlighted timeline objectpublic java.awt.Color getEventFillColor1()
public void setEventFillColor1(java.awt.Color color)
color
- the first fill color for the gradient background of timeline
objects that are eventspublic java.awt.Color getEventFillColor2()
public void setEventFillColor2(java.awt.Color color)
color
- the second fill color for the gradient background of timeline
objects that are eventspublic void setEventLineColor(java.awt.Color color)
color
- the line color for the event timeline objectpublic java.awt.Color getEventLineColor()
protected boolean isEvent()
public java.awt.Color getPastFillColor1()
public void setPastFillColor1(java.awt.Color color)
color
- the first background color for past activitiespublic java.awt.Color getPastFillColor2()
public void setPastFillColor2(java.awt.Color color)
color
- the second background color for past activitiespublic java.awt.Color getResizeHandleColor()
public void setResizeHandleColor(java.awt.Color color)
color
- the handle colorpublic void validate()
validate
in class java.awt.Container
public void revalidate()
revalidate
in class javax.swing.JComponent
public void invalidate()
invalidate
in class java.awt.Container
public void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
firePropertyChange
in class javax.swing.JComponent
public void firePropertyChange(java.lang.String propertyName, byte oldValue, byte newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, char oldValue, char newValue)
firePropertyChange
in class javax.swing.JComponent
public void firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
firePropertyChange
in class java.awt.Component
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, short oldValue, short newValue)
firePropertyChange
in class java.awt.Component
public void repaint()
repaint
in class java.awt.Component
public void repaint(int x, int y, int width, int height)
repaint
in class java.awt.Component
public void repaint(long tm)
repaint
in class java.awt.Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |