|
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.Objectjava.awt.Component
java.awt.Canvas
leon.view.web.struts.gantt.LyStrutsGanttCanvas
public class LyStrutsGanttCanvas
This class defines a Gantt component.
Nested Class Summary | |
---|---|
static class |
LyStrutsGanttCanvas._LySpecialDay
Internal class representing a special day for the planning. |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
DEFAULT_HEIGHT
The default height. |
static int |
DEFAULT_SCALE_HEIGHT
Default scale height at the top of the component. |
static int |
DEFAULT_WIDTH
The default width. |
static short |
SCALE_DAY
Scale (in day). |
static short |
SCALE_HOUR
Scale (in hour). |
static short |
SCALE_MINUTE
Scale (in minute). |
static short |
SCALE_MONTH
Scale (in month). |
static short |
SCALE_SECOND
Scale (in second). |
static short |
SCALE_WEEK
Scale (in week). |
static short |
SCALE_YEAR
Scale (in year). |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
LyStrutsGanttCanvas()
Class constructor of a Gantt object for the struts target. |
|
LyStrutsGanttCanvas(LyStrutsGantt parent)
Deprecated. replaced by LyStrutsGanttCanvas() because the parent
parameter is not used. |
Method Summary | |
---|---|
void |
addSensitiveItem(java.awt.Rectangle rect,
java.lang.String id,
java.lang.String tooltip)
Adds a sensitive item to the planning. |
void |
addStep(boolean left,
boolean remove)
Adds or removes a step to the planning. |
void |
checkComponentsSize()
Check the size of all the components of the canvas. |
java.awt.Dimension |
computeSize()
Computes the size of the planning. |
void |
free()
Free all used resources. |
long |
getAbscisseDate(int abscisse)
Gets the date corresponding to the given abscisse. |
java.util.Date |
getBeginDate()
Gets the begin date (the date at position 0 of the abscisse). |
int |
getDateAbscisse(java.util.Date date)
Gets the abscisse corresponding to the given date. |
int |
getDateAbscisse(long time)
Gets the abscisse corresponding to the given time. |
java.awt.Rectangle |
getElementBounds(LyInterval interval)
Gets the bounds of given interval. |
java.util.Date |
getEndDate()
Gets the end date (the date at ultimate position of the abscisse). |
LyEnvironment |
getEnvironment()
Gets the Leonardi's Environment. |
java.awt.Color |
getFontColor()
Gets the font color. |
java.awt.Color |
getLinesColor()
Gets the color used to draw the vertical lines of the planning. |
java.util.Date |
getMaximumDate()
Gets the maximum date of the planning. |
java.util.Date |
getMinimumDate()
Gets the minimum date of the planning. |
java.awt.Dimension |
getPreferredSize()
(non-Javadoc). |
java.awt.Color |
getScaleBackground()
Gets the scale color of the planning background. |
java.awt.Color |
getScaleLinesColor()
Gets the color of the lines scale. |
java.awt.Color |
getWeekEndColor()
Gets the color used to draw the week-ends on the planning. |
void |
init()
Initialization method. |
void |
paint(java.awt.Graphics g)
(non-Javadoc). |
void |
resetView()
Resets all to initial values. |
void |
setBigScale(short scale)
Sets the big scale of the planning. |
void |
setBigStep(int step)
Sets the big step of the planning. |
void |
setCheckComponentsSize()
Sets the attribute _checkComponentsSize to true. |
void |
setCurrentDateDisplayTime(boolean display)
Indicates if time is displayed with current date cursor. |
void |
setCurrentDateRefreshPeriod(int period)
Sets the period of the planning. |
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 font color. |
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 |
setParent(LyStrutsGantt parent)
Sets the parent of the gantt. |
void |
setScale(short scale)
Sets the scale type of the planning. |
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 |
setSize(int w,
int h)
(non-Javadoc). |
void |
setSpecialDays(java.util.Vector<LyStrutsGanttCanvas._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 |
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 used for weeks. |
Methods inherited from class java.awt.Canvas |
---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static int DEFAULT_WIDTH
public static 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
Constructor Detail |
---|
public LyStrutsGanttCanvas(LyStrutsGantt parent)
LyStrutsGanttCanvas()
because the parent
parameter is not used.
parent
- the Gantt containing this canvaspublic LyStrutsGanttCanvas()
LyStrutsGanttCanvas(LyStrutsGantt)
because the
parameter was not used.Method Detail |
---|
public void init()
public void free()
free
in interface LyFreeInterface
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
Component.getPreferredSize()
public void resetView()
public java.util.Date getMinimumDate()
public java.util.Date getMaximumDate()
public void setDateFormat(java.lang.String dateFormat)
dateFormat
- the date format used to display datespublic void setTimeFormat(java.lang.String timeFormat)
timeFormat
- the time format used to display timespublic 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 planning elementsmaximumDate
- the maximum date of all planning elementsbeginDate
- 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 setMinimumIntervalDate(java.util.Date minimumIntervalDate)
minimumIntervalDate
- new minimum interval datepublic void setMaximumIntervalDate(java.util.Date maximumIntervalDate)
maximumIntervalDate
- new maximum interval datepublic int getDateAbscisse(java.util.Date date)
date
- the date to be converted
public int getDateAbscisse(long time)
time
- the time to be converted
public long getAbscisseDate(int abscisse)
abscisse
- the abscisse to be converted
public java.awt.Dimension computeSize()
public java.awt.Rectangle getElementBounds(LyInterval interval)
interval
- the interval
public void setCheckComponentsSize()
_checkComponentsSize
to true.
public void checkComponentsSize()
public void addStep(boolean left, boolean remove)
left
- true if step must be added or removed on the left, false otherwiseremove
- true if step must be removed, false otherwisepublic void setSpecialDays(java.util.Vector<LyStrutsGanttCanvas._LySpecialDay> days)
days
- the list of _LySpecialDay instancespublic java.util.Date getBeginDate()
public java.util.Date getEndDate()
public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
Component.paint(java.awt.Graphics)
public void addSensitiveItem(java.awt.Rectangle rect, java.lang.String id, java.lang.String tooltip)
rect
- the rectangleid
- the idtooltip
- the tooltippublic void setScaleBackground(java.awt.Color color)
color
- the new color used to fill the scalegetScaleBackground()
public java.awt.Color getScaleBackground()
setScaleBackground(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()
setScaleLinesColor(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 font colorgetFontColor()
public java.awt.Color getFontColor()
setFontColor(Color)
public void setUpperScaleFont(java.awt.Font font)
font
- the new font used for the upper scale partpublic void setWeekInitial(java.lang.String weekInitial)
weekInitial
- the string used for weekspublic void setWeekendColor(java.awt.Color weekendColor)
weekendColor
- the new color used to draw the week-ends on the planningpublic java.awt.Color getWeekEndColor()
public void setParent(LyStrutsGantt parent)
parent
- the Gantt containing this GanttCanvaspublic void setSize(int w, int h)
setSize
in class java.awt.Component
Component.setSize(int, int)
public void setCurrentDateRefreshPeriod(int period)
period
- the period in secondspublic void setCurrentDateDisplayTime(boolean display)
display
- true if time must be displayed, false otherwisepublic void setStep(int step)
step
- the new steppublic void setBigStep(int step)
step
- the new big steppublic void setScale(short scale)
scale
- the new scale, can be SCALE_DAY
, SCALE_HOUR
, SCALE_MINUTE
, SCALE_MONTH
, SCALE_SECOND
, SCALE_WEEK
or SCALE_YEAR
public void setBigScale(short scale)
scale
- the new big scalepublic LyEnvironment getEnvironment()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |