|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.openswing.swing.gantt.client.GanttControl
Title: OpenSwing Framework
Description: Panel that contains a grid on the left side (the gantt legend) and a gantt diagram on the right. Each row of the gannt is defined by a GanttRowVO object, that contains the legend values for the row and a set of Appointment objects. When the set of Appointment objects are read, this control analyze the objects and split an Appointment in more than one, if the Appointment is spreaded on more days, so that each new Appointment is bound inside a day. After editing the gantt, the set of changed Appointments of a specified row can be retrieved by means of "getAppointments" method that analyzes Appointment objects: if there exists two consecutive Appointments, then it joins them in a unique Appointment object, so that the method returns the minimal set of objects.
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Nested Class Summary | |
class |
GanttControl.GanttColumnEditor
Title: OpenSwing Framework Description: Column editor used to resize the gantt bar. |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
GanttControl()
|
Method Summary | |
void |
addAppointmentChangeListener(AppointmentChangeListener listener)
Add a AppointmentChangeListener listener to the current gantt control. |
void |
addNotify()
Method called by the JVM to load gannt. |
void |
addRow(GanttRowVO ganttRow)
Add a row to the panel (grid on the left + gantt). |
java.util.HashSet |
getAppointments(int row)
|
int |
getColumnWidth()
|
int |
getDividerLocation()
|
java.util.Date |
getEndDate()
|
GanttDataLocator |
getGanttDataLocator()
|
java.util.Map |
getGanttParameters()
|
int |
getRowCount()
|
int |
getRowHeight()
|
java.util.Date |
getStartDate()
|
java.lang.Object |
getValueAt(int rowNumber,
int colIndex)
|
void |
init(java.lang.String[] columnNames)
Create the grid content. |
boolean |
isAutoLoadData()
|
boolean |
isEnableDelete()
|
boolean |
isEnableEdit()
|
boolean |
isEnableInsert()
|
boolean |
isGanttEnabled()
|
boolean |
isGridEnabled()
|
boolean |
isShowDescription()
|
boolean |
isShowTime()
|
void |
reloadData()
Load data in the gantt panel. |
void |
removeAppointmentChangeListener(AppointmentChangeListener listener)
Remove the specified AppointmentChangeListener listener from the current gantt control. |
void |
setAutoLoadData(boolean autoLoadData)
Define if grid must be automatically loaded when it is showed. |
void |
setColumnWidth(int width)
Set columns width. |
void |
setDividerLocation(int location)
Set divider location. |
void |
setEnableDelete(boolean enableDelete)
Enable deleting of appointments. |
void |
setEnableEdit(boolean enableEdit)
enable editing of appointments; default value: true . |
void |
setEnableInsert(boolean enableInsert)
Enable inserting of appointments. |
void |
setEndDate(java.util.Date endDate)
Set end date. |
void |
setGanttDataLocator(GanttDataLocator ganttDataLocator)
Set the gantt data locator. |
void |
setGanttEnabled(boolean enabled)
Set gantt editability. |
void |
setGanttParameters(java.util.Map ganttParameters)
Set the gantt parameters. |
void |
setGridColumnVisible(int columnIndex,
boolean visible)
Set column visibility. |
void |
setGridColumnWidth(int columnIndex,
int width)
Set column width. |
void |
setGridEnabled(boolean enabled)
Set editability for the grid on the left. |
void |
setRowHeight(int height)
Set row height |
void |
setShowDescription(boolean showDescription)
Show the description above the colored rectangle. |
void |
setShowTime(boolean showTime)
Used to show the appointment duration above the colored rectangle. |
void |
setStartDate(java.util.Date startDate)
Set start date |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GanttControl()
Method Detail |
public final void setStartDate(java.util.Date startDate)
startDate
- start datepublic final void setEndDate(java.util.Date endDate)
endDate
- end datepublic void init(java.lang.String[] columnNames)
columnNames
- column identifiers for the grid on the leftpublic final void setColumnWidth(int width)
width
- column widthpublic final int getColumnWidth()
public final void addNotify()
public void reloadData()
public final void addRow(GanttRowVO ganttRow)
public final void setGanttEnabled(boolean enabled)
enabled
- true
if the gantt is editable, false
otherwisepublic final boolean isGanttEnabled()
public final void setGridEnabled(boolean enabled)
enabled
- true
if the grid on the left is editable, false
otherwisepublic final boolean isGridEnabled()
public final void setRowHeight(int height)
height
- row heightpublic final int getRowHeight()
public final void setDividerLocation(int location)
location
- divider locationpublic final int getDividerLocation()
public final GanttDataLocator getGanttDataLocator()
public final void setGanttDataLocator(GanttDataLocator ganttDataLocator)
ganttDataLocator
- gantt data locatorpublic final java.util.Map getGanttParameters()
public final void setGanttParameters(java.util.Map ganttParameters)
ganttParameters
- gantt parameterspublic final java.util.HashSet getAppointments(int row)
row
- row in the gantt diagram
public final int getRowCount()
public final boolean isShowDescription()
public final void setShowDescription(boolean showDescription)
showDescription
- show the description above the colored rectanglepublic final java.util.Date getStartDate()
public final java.util.Date getEndDate()
public final boolean isEnableDelete()
public final void setEnableDelete(boolean enableDelete)
enableDelete
- enable deleting of appointmentspublic final boolean isEnableInsert()
public final void setEnableInsert(boolean enableInsert)
enableInsert
- enable inserting of appointmentspublic final boolean isShowTime()
public final void setShowTime(boolean showTime)
showTime
- show the appointment duration above the colored rectanglepublic final void addAppointmentChangeListener(AppointmentChangeListener listener)
listener
- listener to addpublic final void removeAppointmentChangeListener(AppointmentChangeListener listener)
listener
- listener to removepublic final java.lang.Object getValueAt(int rowNumber, int colIndex)
rowNumber
- row numbercolIndex
- column index
public final void setGridColumnWidth(int columnIndex, int width)
columnIndex
- column index in the grid (legend area)width
- column width to setpublic final void setGridColumnVisible(int columnIndex, boolean visible)
columnIndex
- column index in the grid (legend area)visible
- column visibilitypublic final boolean isEnableEdit()
public final void setEnableEdit(boolean enableEdit)
true
.
enableEdit
- enable editing of appointmentspublic final boolean isAutoLoadData()
true
to automatically load data when the gantt is showed, false
otherwisepublic final void setAutoLoadData(boolean autoLoadData)
autoLoadData
- true
to automatically load data when the gantt is showed, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |