|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.win.swing.component.LyAbstractGanttPanelManager
public abstract class LyAbstractGanttPanelManager
Handles Gantt panel management.
Nested Class Summary | |
---|---|
class |
LyAbstractGanttPanelManager._LyGanttCanvasTreeAdjustmentListener
Handles tree adjustment events. |
class |
LyAbstractGanttPanelManager._LySensitiveItem
Defines a sensitive item area. |
static class |
LyAbstractGanttPanelManager._LySpecialDay
Internal class representing a special day for the planning. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.awt.Cursor |
DEFAULT_CURSOR
Default cursor. |
static int |
DEFAULT_HEIGHT
Default height of the canvas. |
static int |
DEFAULT_SCALE_HEIGHT
Default height of the scale at the top of the component. |
static int |
DEFAULT_WIDTH
Default width of the canvas. |
static java.awt.Cursor |
DIVIDE_CURSOR
Cursor used when an interval is divided. |
static java.awt.Cursor |
HAND_CURSOR
Hand cursor (for intervals translation). |
static short |
SCALE_DAY
Day scaling. |
static short |
SCALE_HOUR
Hour scaling. |
static short |
SCALE_MINUTE
Minute scaling. |
static short |
SCALE_MONTH
Month scaling. |
static short |
SCALE_SECOND
Second scaling. |
static short |
SCALE_WEEK
Week scaling. |
static short |
SCALE_YEAR
Year scaling. |
static java.awt.Cursor |
W_RESIZE_CURSOR
Resize cursor (for resizing scale and intervals). |
Constructor Summary | |
---|---|
LyAbstractGanttPanelManager()
Gant panel manager constructor. |
|
LyAbstractGanttPanelManager(java.awt.Component tree,
java.awt.Component comp,
LyActionListener listener)
Gant panel manager constructor. |
Method Summary | |
---|---|
void |
addStep(boolean left,
boolean remove)
Adds or removes a step to the planning. |
void |
centerOnDate(java.util.Date date)
Centers the planning on the given date. |
void |
checkComponentsSize(java.awt.Graphics g)
Checks the size of all the components of the canvas. |
void |
componentPainted(java.awt.event.PaintEvent event)
(non-Javadoc). |
java.awt.Dimension |
computeSize()
Compute the size of the planning. |
void |
drawInSplitter(java.awt.Graphics gc,
int xOffset,
int yOffset)
Draws the canvas in a graphics context. |
LyActionTransmitter |
getActionTransmitter()
Gets the action transmitter associated to this Gantt panel manager. |
java.util.Date |
getBeginDate()
Returns the begin date (the date at position 0). |
LyAbstractCanvasSplitterManager |
getCanvasSplitter()
Gets the associated canvas splitter. |
long |
getCenterDate()
Returns the date at the center of the planning. |
java.awt.Component |
getComponent()
Gets the current Gantt component. |
java.awt.Dimension |
getComponentSize()
Gets the size of the component, or its parent splitter if any. |
abstract java.awt.Rectangle |
getElementBounds(LyGanttElement ganttElement)
Returns the bounds of a given Gantt element. |
java.util.Date |
getEndDate()
Returns the end date (the date at last position). |
java.awt.Color |
getFontColor()
Gets the font color. |
abstract java.awt.Image |
getImageOffScreen(java.awt.Dimension offScreenSize)
Returns the offscreen image if any. |
int |
getLeftHeaderWidth()
Gets the left header width. |
java.awt.Color |
getLinesColor()
Gets the vertical lines color. |
java.lang.Object |
getLock()
Get a lock on the table to prevent concurrent access on rows. |
java.util.Date |
getMaximumDate()
Returns the maximum date of the planning. |
java.util.Date |
getMinimumDate()
Returns the minimum date of the planning. |
java.awt.Dimension |
getMinimumSize()
Computes minimum size depending on content. |
java.awt.Dimension |
getPreferredSize()
Computes preferred size depending on content. |
java.awt.Color |
getScaleBackground()
Gets the scale background color. |
java.awt.Color |
getScaleLinesColor()
Gets the scale lines color. |
java.awt.Dimension |
getScrollableSize()
Gets the scrollable size, which is equals to the planning size. |
LySelectionTransmitter |
getSelectionTransmitter()
Gets the selection transmitter associated to this Gantt panel manager. |
abstract java.awt.Graphics |
getTargetGraphics(java.awt.Image offScreenImage,
java.awt.Graphics defaultGraphics)
Returns the graphics context of the specified offscreen image or the default graphics context if none is available. |
java.awt.Color |
getTooltipColor()
Gets the tooltip color. |
java.awt.Color |
getTooltipFontColor()
Gets the tooltip font color. |
java.lang.String |
getToolTipText()
Returns the current tooltip for panel. |
int |
getTopHeaderHeight()
Gets the top header height. |
java.awt.Color |
getWeekEndColor()
Gets the week end color. |
int |
headerHeight()
Returns the height, in pixels, of the Gantt header. |
int |
lineHeight()
Returns the height, in pixels, of aGantt ling. |
void |
paintCommon(java.awt.Graphics g)
Draws the title panel in the specified graphics context. |
void |
paintComponent()
Paints the Gantt component. |
abstract void |
paintOnScreen(java.awt.Image offScreenImage,
java.awt.Graphics onScreenGraphics)
Paints the specified offscreen image to the onscreen graphics context. |
void |
popupMenu(java.awt.event.MouseEvent e)
Manages popup menus. |
void |
reset()
Resets the Gannt planning. |
java.awt.Dimension |
scrollSize()
Gets the size of the scrolling. |
void |
scrollX(int x)
Scrolls the screen horizontally. |
void |
setBigScale(short scaleType)
Sets the big scaling type. |
void |
setBigStep(int step)
Sets the big step of the planning. |
void |
setCanvasSplitter(LyAbstractCanvasSplitterManager splitter)
Sets the canvas splitter. |
void |
setCheckComponentsSize(boolean check)
Sets the component size check property. |
void |
setCurrentDateDisplayTime(boolean display)
Sets the _currentDateDisplayTime parameter indicating if time must be displayed with the current date cursor. |
void |
setCurrentDateRefreshPeriod(int period)
Sets the refresh period, in seconds, for current date refresh. |
void |
setDateFormat(java.lang.String dateFormat)
Sets the date format used to display dates. |
void |
setDates(java.util.Date minimumDate,
java.util.Date maximumDate,
java.util.Date beginDate,
java.util.Date endDate,
boolean adjustMinDate,
boolean adjustMaxDate)
Sets the dates of the Gantt planning. |
void |
setFontColor(java.awt.Color color)
Sets the color of the font. |
void |
setGanttElements(java.lang.Object treeElement,
java.util.Vector<LyGanttElement> ganttElements)
Sets tree element and Gantt elements association. |
void |
setLinesColor(java.awt.Color color)
Sets the color used to draw the vertical lines of the planning. |
void |
setMaximumIntervalDate(java.util.Date maximumIntervalDate)
Sets the maximum interval date. |
void |
setMinimumIntervalDate(java.util.Date minimumIntervalDate)
Sets the minimum interval date. |
void |
setScale(short scaleType)
Sets the scaling type. |
void |
setScaleBackground(java.awt.Color color)
Sets the color used to fill the scale. |
void |
setScaleLinesColor(java.awt.Color color)
Sets the color used to draw the lines of the scale. |
void |
setScroll(int scroll)
Sets the x scroll position of the canvas. |
void |
setSpecialDays(java.util.Vector<LyAbstractGanttPanelManager._LySpecialDay> days)
Sets the list of special days for this planning. |
void |
setStep(int step)
Sets the step of the planning. |
void |
setTimeFormat(java.lang.String timeFormat)
Sets the time format used to display times. |
void |
setTooltipColor(java.awt.Color tooltipColor)
Sets the color used for tooltips (when an item is being moved). |
abstract void |
setTooltipFont(java.awt.Font font)
Sets the font used for the tooltip. |
void |
setTooltipFontColor(java.awt.Color tooltipFontColor)
Sets the font color used for tooltips (when an item is being moved). |
void |
setUpperScaleFont(java.awt.Font font)
Sets the font used for the upper scale part. |
void |
setWeekendColor(java.awt.Color weekendColor)
Sets the color used to draw the week-ends on the planning. |
void |
setWeekInitial(java.lang.String weekInitial)
Sets the initial string for weeks. |
void |
setZoom(float zoom)
Sets the new zoom factor of the planning. |
void |
startDivideIntervalMode()
Sets the division mode. |
void |
translatePlanning(boolean left)
Translates the viewable dates on the left or right. |
java.awt.Dimension |
viewSize()
Gets the visible component size. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public static final int DEFAULT_SCALE_HEIGHT
public static final short SCALE_SECOND
public static final short SCALE_MINUTE
public static final short SCALE_HOUR
public static final short SCALE_DAY
public static final short SCALE_WEEK
public static final short SCALE_MONTH
public static final short SCALE_YEAR
public static final java.awt.Cursor DEFAULT_CURSOR
public static final java.awt.Cursor HAND_CURSOR
public static final java.awt.Cursor W_RESIZE_CURSOR
public static final java.awt.Cursor DIVIDE_CURSOR
Constructor Detail |
---|
public LyAbstractGanttPanelManager()
public LyAbstractGanttPanelManager(java.awt.Component tree, java.awt.Component comp, LyActionListener listener)
tree
- the tree componentcomp
- the Gantt componentlistener
- the action listenersMethod Detail |
---|
public abstract java.awt.Image getImageOffScreen(java.awt.Dimension offScreenSize)
offScreenSize
- size of the offscreen image
public abstract java.awt.Graphics getTargetGraphics(java.awt.Image offScreenImage, java.awt.Graphics defaultGraphics)
offScreenImage
- the image to get its graphics contextdefaultGraphics
- the default graphics context if the image doesn't have one
public abstract void paintOnScreen(java.awt.Image offScreenImage, java.awt.Graphics onScreenGraphics)
offScreenImage
- the offscreen image to paint on the onscreen contextonScreenGraphics
- the graphics context to paint the offscreen image onpublic void reset()
public int headerHeight()
public int lineHeight()
public java.awt.Dimension scrollSize()
public java.awt.Dimension viewSize()
public java.awt.Dimension computeSize()
public java.awt.Dimension getComponentSize()
public void setMinimumIntervalDate(java.util.Date minimumIntervalDate)
minimumIntervalDate
- new minimum interval datepublic void setMaximumIntervalDate(java.util.Date maximumIntervalDate)
maximumIntervalDate
- new maximum interval datepublic void setDates(java.util.Date minimumDate, java.util.Date maximumDate, java.util.Date beginDate, java.util.Date endDate, boolean adjustMinDate, boolean adjustMaxDate)
minimumDate
- the minimum date of all the elements of the planningmaximumDate
- the maximum date of all the elements of the planningbeginDate
- the first visible date of the planningendDate
- the last visible date of the planningadjustMinDate
- indicates if minimum date must be set to the begin date if begin date is
before the minimum dateadjustMaxDate
- indicates if maximum date must be set to the end date if end date is
after the maximum datepublic void centerOnDate(java.util.Date date)
date
- the date that becomes the center of the planningpublic void translatePlanning(boolean left)
left
- Indicates if translation must be performed on the left or on the right.public void setSpecialDays(java.util.Vector<LyAbstractGanttPanelManager._LySpecialDay> days)
days
- the list of _LySpecialDay instancespublic void checkComponentsSize(java.awt.Graphics g)
g
- the context graphics handling the display of the canvas componentspublic java.util.Date getBeginDate()
public java.util.Date getEndDate()
public void setCheckComponentsSize(boolean check)
check
- Indicates if the components size must be checked.public void popupMenu(java.awt.event.MouseEvent e)
e
- the mouse event for the component popup menupublic void setScale(short scaleType)
scaleType
- the scaling type. One of the following:
public void setBigScale(short scaleType)
scaleType
- the scaling type. One of the following:
public void setStep(int step)
step
- the new step valuepublic void setBigStep(int step)
step
- the new big step valuepublic void addStep(boolean left, boolean remove)
left
- true if step must be added or removed on the left, false for the rightremove
- true if step must be removed, false if step must be addedpublic void scrollX(int x)
x
- the scroll amountpublic void setScroll(int scroll)
scroll
- the new x scroll positionpublic void setZoom(float zoom)
zoom
- the new zoom factorpublic void setWeekInitial(java.lang.String weekInitial)
weekInitial
- the string used for weekspublic void setScaleBackground(java.awt.Color color)
color
- the new scale colorgetScaleBackground()
public java.awt.Color getScaleBackground()
Color.GRAY
if not availablesetScaleBackground(Color)
public void setScaleLinesColor(java.awt.Color color)
color
- the new color used to draw the lines of the scalegetScaleLinesColor()
public java.awt.Color getScaleLinesColor()
Color.DARK_GRAY
if not availablesetScaleLinesColor(Color)
public void setLinesColor(java.awt.Color color)
color
- the new color used to draw the vertical lines of the planninggetLinesColor()
public java.awt.Color getLinesColor()
setLinesColor(Color)
public void setFontColor(java.awt.Color color)
color
- the new color of the fontgetFontColor()
public java.awt.Color getFontColor()
Color.BLACK
if not availablesetFontColor(Color)
public void setWeekendColor(java.awt.Color weekendColor)
weekendColor
- the new color used to draw the week-ends on the planninggetWeekEndColor()
public java.awt.Color getWeekEndColor()
Color.CYAN
if not availablesetWeekendColor(Color)
public void setTooltipColor(java.awt.Color tooltipColor)
tooltipColor
- the new tooltip colorgetTooltipColor()
public java.awt.Color getTooltipColor()
Color.YELLOW
if not availablesetTooltipColor(Color)
public void setTooltipFontColor(java.awt.Color tooltipFontColor)
tooltipFontColor
- the tooltip font colorgetTooltipFontColor()
public java.awt.Color getTooltipFontColor()
setTooltipFontColor(Color)
public void setUpperScaleFont(java.awt.Font font)
font
- the new font used for the upper scale partpublic java.util.Date getMinimumDate()
public java.util.Date getMaximumDate()
public void setDateFormat(java.lang.String dateFormat)
dateFormat
- the new date format used to display datespublic void setTimeFormat(java.lang.String timeFormat)
timeFormat
- the new time format used to display timespublic long getCenterDate()
public void setCurrentDateRefreshPeriod(int period)
period
- time in seconds, negative if current date should not be displayedpublic void setCurrentDateDisplayTime(boolean display)
display
- true if time must be displayed, false otherwisepublic void setGanttElements(java.lang.Object treeElement, java.util.Vector<LyGanttElement> ganttElements)
treeElement
- the tree elementganttElements
- the Gantt elements associated with the given tree elementpublic void paintComponent()
public void paintCommon(java.awt.Graphics g)
g
- the graphics context to draw the title panelpublic abstract java.awt.Rectangle getElementBounds(LyGanttElement ganttElement)
ganttElement
- the Gantt element
public abstract void setTooltipFont(java.awt.Font font)
font
- the new font used for the tooltippublic void startDivideIntervalMode()
_divideIntervalMode
.
public java.lang.String getToolTipText()
public java.awt.Dimension getMinimumSize()
getPreferredSize()
public java.awt.Dimension getPreferredSize()
public java.awt.Component getComponent()
public LyActionTransmitter getActionTransmitter()
LySimpleActionTransmitter
is created.
LyEventTransmitter.getActionTransmitter()
public LySelectionTransmitter getSelectionTransmitter()
LySimpleSelectionTransmitter
is created.
LyEventTransmitter.getSelectionTransmitter()
public void componentPainted(java.awt.event.PaintEvent event)
componentPainted
in interface LyPaintListener
event
- the paint eventLyPaintListener.componentPainted(java.awt.event.PaintEvent)
public void drawInSplitter(java.awt.Graphics gc, int xOffset, int yOffset)
gc
- the graphical contextxOffset
- the horizontal offset for the splitter drawingyOffset
- the vertical offset for the splitter drawingpublic void setCanvasSplitter(LyAbstractCanvasSplitterManager splitter)
splitter
- the splittergetCanvasSplitter()
public java.awt.Dimension getScrollableSize()
public int getTopHeaderHeight()
public int getLeftHeaderWidth()
public LyAbstractCanvasSplitterManager getCanvasSplitter()
setCanvasSplitter(LyAbstractCanvasSplitterManager)
public java.lang.Object getLock()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |