public class DefaultCapacityObjectRenderer extends JPanel implements ITimelineObjectRenderer
DefaultCapacityObject,
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 |
|---|
DefaultCapacityObjectRenderer()
Constructs a new capacity object renderer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
char oldValue,
char newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
double oldValue,
double newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
float oldValue,
float newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
long oldValue,
long newValue)
Overriden for performance reasons.
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Overriden for performance reasons.
|
void |
firePropertyChange(String propertyName,
short oldValue,
short newValue)
Overriden for performance reasons.
|
protected ICapacityObject |
getCapacityObject()
Returns the currently rendered capacity object.
|
Color |
getFillColor()
Returns the color that will be used for filling the background of the
renderer component.
|
Color |
getFocusColor()
Returns the color that will be used for filling the background of the
renderer component when the capacity object has the focus.
|
Color |
getHighlightFillColor()
Returns the color that will be used for filling the background of the
renderer component when the capacity object is highlighted.
|
protected TimelineObjectLayer |
getLayer()
Returns the timeline object layer on which the capacity object is
located.
|
Color |
getOverallocationFillColor() |
Color |
getPastFillColor()
Returns the color that will be used for filling the background of the
renderer component when the capacity object is located in the past.
|
protected int |
getRow()
Returns the number of the row on which the capacity object is located.
|
Color |
getSelectionFillColor()
Returns the color that will be used for filling the background of the
renderer component when the capacity object is selected.
|
TimelineObjectPath |
getTimelineObjectPath()
Returns the path to the currently rendered capacity 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 if the capacity object has the focus.
|
void |
invalidate()
Overriden for performance reasons.
|
protected boolean |
isHighlighted()
Determines whether the capacity object is currently highlighted or not.
|
protected boolean |
isSelected()
Determines whether the capacity object is selected or not.
|
boolean |
isVisible()
Overriden in order to fix a bug in AWT, which causes the cursor to
flicker during drag and drop operations.
|
protected void |
paintComponent(Graphics g) |
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 |
setFillColor(Color color)
Sets the color that will be used for filling the background of the
renderer component.
|
void |
setFocusColor(Color color)
Sets the color that will be used for filling the background of the
renderer component when the capacity object has the focus.
|
void |
setHighlightFillColor(Color color)
Sets the color that will be used for filling the background of the
renderer component when the capacity object is highlighted.
|
void |
setOverallocationFillColor(Color overallocationFillColor) |
void |
setPastFillColor(Color color)
Sets the color that will be used for filling the background of the
renderer component when the capacity object is located in the past.
|
void |
setSelectionFillColor(Color color)
Sets the color that will be used for filling the background of the
renderer component when the capacity object is selected.
|
void |
validate()
Overriden for performance reasons.
|
getAccessibleContext, 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 DefaultCapacityObjectRenderer()
public Component getTimelineObjectRendererComponent(TimelineObjectLayer layer, TimelineObjectPath path, boolean selected, boolean hasFocus, boolean highlighted, int row)
ITimelineObjectRenderergetTimelineObjectRendererComponent in interface ITimelineObjectRendererlayer - 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 drawnpublic Insets getTimelineObjectRendererInsets(int x, int y, int width, int height)
ITimelineObjectRendererDefaultActivityObjectRenderer).getTimelineObjectRendererInsets in interface ITimelineObjectRendererx - the x-coordinate of the bounds that will be assigned to the
renderer componenty - the y-coordinate of the bounds that will be assigned to the
renderer componentwidth - the width of the bounds that will be assigned to the renderer
componentheight - the height of the bounds that will be assigned to the renderer
componentprotected void paintComponent(Graphics g)
paintComponent in class JComponentpublic Color getFillColor()
public void setFillColor(Color color)
color - the color used for the background of the rendererpublic Color getFocusColor()
public void setFocusColor(Color color)
color - the color used for the background when the capacity object has
the focuspublic Color getHighlightFillColor()
public void setHighlightFillColor(Color color)
color - the color used for the background when the capacity object is
highlightedpublic Color getPastFillColor()
public void setPastFillColor(Color color)
color - the color used for the background when the capacity object is
located in the pastpublic Color getSelectionFillColor()
public void setSelectionFillColor(Color color)
color - the color used for the background when the capacity object is
selectedpublic boolean hasFocus()
protected ICapacityObject getCapacityObject()
protected boolean isSelected()
protected boolean isHighlighted()
LayerContainer.addHighlightedObject(com.dlsc.flexgantt.model.gantt.TimelineObjectPath)protected int getRow()
protected TimelineObjectLayer getLayer()
public void validate()
public void invalidate()
invalidate in class Containerpublic void revalidate()
revalidate in class JComponentpublic void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
firePropertyChange in class JComponentpublic void firePropertyChange(String propertyName, byte oldValue, byte newValue)
firePropertyChange in class Componentpublic void firePropertyChange(String propertyName, char oldValue, char newValue)
firePropertyChange in class JComponentpublic void firePropertyChange(String propertyName, double oldValue, double newValue)
firePropertyChange in class Componentpublic void firePropertyChange(String propertyName, float oldValue, float newValue)
firePropertyChange in class Componentpublic void firePropertyChange(String propertyName, long oldValue, long newValue)
firePropertyChange in class Componentprotected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
firePropertyChange in class Componentpublic void firePropertyChange(String propertyName, short oldValue, short newValue)
firePropertyChange in class Componentpublic void repaint()
public void repaint(int x,
int y,
int width,
int height)
public void repaint(long tm)
public boolean isVisible()
public Color getOverallocationFillColor()
public void setOverallocationFillColor(Color overallocationFillColor)
overallocationFillColor - the overallocationFillColor to setpublic TimelineObjectPath getTimelineObjectPath()
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.