public class PrintGanttChart extends AbstractGanttChart implements LayoutManager, Printable, IDatelineModelListener
AbstractGanttChart.Banner
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
PROPERTY_ACTIVE_SPREADSHEET, PROPERTY_CALENDAR_MODEL, PROPERTY_CALENDAR_VISIBLE, PROPERTY_COLUMN_MODEL, PROPERTY_COMMAND_STACK, PROPERTY_CONTROLS_BG_COLOR, PROPERTY_CONTROLS_FG_COLOR, PROPERTY_CROSSHAIR_VISIBLE, PROPERTY_GRID_LINE_MODE, PROPERTY_KEY_COLUMN_POSITION, PROPERTY_LABELS_VISIBLE, PROPERTY_LAYER_CONTAINER_ROW_HEADER_WIDTH, PROPERTY_MODEL, PROPERTY_PAGING_MODEL, PROPERTY_POLICY_PROVIDER, PROPERTY_POPUP_VISIBLE, PROPERTY_RELATIONS_VISIBLE, PROPERTY_ROW_LAYER_VISIBLE, PROPERTY_ROW_RESIZE_POSITION, PROPERTY_TIME_NOW_SCROLLING, PROPERTY_TIME_NOW_VISIBLE, PROPERTY_TREE_TABLE_ROW_HEADER_WIDTH, PROPERTY_VERTICAL_LINES_ON_TOP
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
NO_SUCH_PAGE, PAGE_EXISTS
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
PrintGanttChart(PrintContext ctx)
Constructs a new printable Gantt chart.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(String name,
Component comp) |
void |
alignEndTimes()
Method not supported by the printable Gantt chart.
|
void |
alignStartTimes()
Method not supported by the printable Gantt chart.
|
void |
collapseAll()
Method not supported by the printable Gantt chart.
|
protected void |
copyExpansionState(TreeTable from,
TreeTable to)
Copies the expansion state from one tree table to another (e.g.
|
protected void |
copySettings(AbstractGanttChart from,
AbstractGanttChart to,
boolean initialCopy)
Copies the settings from one Gantt chart to another.
|
protected void |
copySettings(Dateline from,
Dateline to,
ITimeSpan span,
boolean initialCopy)
Copies the settings from one dateline to another.
|
protected void |
copySettings(Eventline from,
Eventline to,
boolean initialCopy)
Copies the settings from one eventline to another.
|
protected void |
copySettings(LayerContainer from,
LayerContainer to,
boolean initialCopy)
Copies the settings from one layer container to another.
|
protected void |
copySettings(PrintContext ctx)
Copies various settings from various Gantt chart UI components to the
printable Gantt chart.
|
protected void |
copySettings(PrintContext ctx,
boolean initialCopy)
Copies various settings from various Gantt chart UI components to the
printable Gantt chart.
|
protected void |
copySettings(Timeline from,
Timeline to,
boolean initialCopy)
Copies the settings from one timeline to another.
|
protected void |
copySettings(TreeTableHeader from,
TreeTableHeader to,
boolean initialCopy)
Copies the settings from one tree table header to another.
|
protected void |
copySettings(TreeTableRowHeader from,
TreeTableRowHeader to,
boolean initialCopy)
Copies the settings from one row header to another.
|
protected void |
copySettings(TreeTable from,
TreeTable to,
boolean initialCopy)
Copies the settings from one tree table to another.
|
void |
datelineModelChanged(DatelineModelEvent e)
The listener's callback method that gets invoked when the model's time
span or time zone changes.
|
void |
datelineModelWillChange(DatelineModelEvent evt)
The listener's callback method that gets invoked when the model's time
span or time zone will change.
|
void |
expandAll()
Method not supported by the printable Gantt chart.
|
IGridComponent[] |
getGridComponents()
Returns all grid components managed by the Gantt chart container.
|
LayerContainer |
getLayerContainer()
Returns the layer container used for printing.
|
LayerContainer[] |
getLayerContainers()
Returns all layer containers managed by the Gantt chart container.
|
LayerContainerScrollPane[] |
getLayerContainerScrollPanes()
Returns all layer container scrollpanes managed by the Gantt chart
container.
|
PreviewDialog |
getPreviewDialog()
Returns a preview dialog that can (optionally) be set if the user
requested a preview before actually printing the Gantt chart.
|
PrintContext[] |
getPrintContexts()
Returns all print context supported by the Gantt chart.
|
TreeTableRowHeader |
getRowHeader()
Returns the row header used for printing.
|
TreeTable |
getTreeTable()
Returns the tree table used for printing.
|
TreeTable[] |
getTreeTables()
Returns all tree tables managed by the Gantt chart container.
|
TreeTableScrollPane[] |
getTreeTableScrollPanes()
Returns all tree table scrollpanes managed by the Gantt chart container.
|
void |
layoutContainer(Container parent) |
Dimension |
minimumLayoutSize(Container parent) |
Dimension |
preferredLayoutSize(Container parent) |
void |
print(boolean preview,
ITimeSpan span)
Method not supported by the printable Gantt chart.
|
int |
print(Graphics g,
PageFormat pageFormat,
int pageIndex) |
protected void |
printFooter(Graphics g,
PageFormat pageFormat)
Prints the footer into the given graphics context.
|
protected void |
printHeader(Graphics g,
PageFormat pageFormat)
Prints the header into the given graphics context.
|
void |
removeLayoutComponent(Component comp) |
void |
resetToPreferredSizes()
Method not supported by the printable Gantt chart.
|
void |
setPreviewDialog(PreviewDialog dialog)
Sets a preview dialog if the user requested a preview dialog before
actually printing the Gantt chart.
|
void |
showAllObjects()
Scrolls and zooms the
Dateline in such a way that all timeline
objects (stored on the currently visible rows) become visible. |
void |
showEarliestObjects()
Scrolls the
Dateline in such a way that the earliest timeline
objects (stored on the currently visible rows) become visible. |
void |
showLatestObjects()
Scrolls the
Dateline in such a way that the latest timeline
objects (stored on the currently visible rows) become visible. |
void |
showMessageContext(IMessage msg)
Method not supported by the printable Gantt chart.
|
void |
showTime(long time,
boolean center)
Requests that the given time will be shown by the Gantt chart.
|
void |
showTimeNow(boolean center)
Requests that the time now will be shown by the Gantt chart.
|
void |
updateState()
Updates the state of the Gantt chart by setting the size of the Gantt
chart based on its preferred size.
|
addAvailableColumn, addMessage, addMessageListener, addSortingListener, addToolBarAction, clearMessages, clearToolBarActions, columnModelChanged, commandExecute, commandRedo, commandStackChanged, commandUndo, createPrintableGanttChart, fireMessageAdded, fireMessageRemoved, fireMessagesCleared, fireSortingEvent, getActiveSpreadsheet, getAvailableColumns, getCalendarModel, getColumn, getColumnCount, getColumnModel, getCommandInterceptor, getCommandStack, getComponentFactory, getControlsBackground, getControlsForeground, getDateline, getDatelineModel, getEventline, getGranularity, getGridLineMode, getKeyColumn, getKeyColumnPosition, getLayerContainerRowHeaderWidth, getMessages, getModel, getPagingModel, getPolicyProvider, getPrintSetup, getProgressMonitorFactory, getRowResizePosition, getSelectorFactory, getTimeline, getTimeSpan, getToolBarActions, getTreeTableHeader, getTreeTableRowHeaderWidth, isCalendarVisible, isCrosshairVisible, isLabelsVisible, isPopupVisible, isRelationsVisible, isRowLayerVisible, isShowingCommandExceptions, isTimeNowScrolling, isTimeNowVisible, isVerticalLinesOnTop, keyPressed, keyReleased, keyTyped, optimizeColumnWidth, optimizeColumnWidth, optimizeColumnWidth, optimizeColumnWidth, optimizeColumnWidth, optimizeColumnWidth, pageChanged, pageWillChange, paint, paintRowResizePosition, print, propertyChange, removeAvailableColumn, removeMessage, removeMessageListener, removeSortingListener, removeToolBarAction, setActiveSpreadsheet, setAvailableColumns, setCalendarModel, setCalendarVisible, setColumnModel, setCommandInterceptor, setCommandStack, setControlsBackground, setControlsForeground, setCrosshairVisible, setEnabled, setGranularity, setGridLineMode, setKeyColumnPosition, setLabelsVisible, setLayerContainerRowHeaderWidth, setModel, setPagingModel, setPolicyProvider, setPopupVisible, setPrintSetup, setProgressMonitorFactory, setRelationsVisible, setRowLayerVisible, setRowResizePosition, setShowingCommandExceptions, setTimeNowScrolling, setTimeNowVisible, setTimeSpan, setTreeTableRowHeaderWidth, setVerticalLinesOnTop, showMessage, showMessage, showMessage, showMessages, sortTables, tearDown
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, 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, paintBorder, paintChildren, paintComponent, 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, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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, invalidate, 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, validate, validateTree
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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, hasFocus, imageUpdate, 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, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public PrintGanttChart(PrintContext ctx)
ctx
- the print context for which the preview Gantt chart gets
created (the preview Gantt chart will copy its settings from
the components provided by the context)protected void copySettings(PrintContext ctx)
ctx
- the print contextprotected void copySettings(PrintContext ctx, boolean initialCopy)
ctx
- the print contextinitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)public void datelineModelWillChange(DatelineModelEvent evt)
IDatelineModelListener
datelineModelWillChange
in interface IDatelineModelListener
evt
- the event that occured on the datelinepublic void datelineModelChanged(DatelineModelEvent e)
IDatelineModelListener
datelineModelChanged
in interface IDatelineModelListener
e
- the event that occured on the datelinepublic LayerContainer getLayerContainer()
public TreeTable getTreeTable()
public TreeTableRowHeader getRowHeader()
public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException
print
in interface Printable
PrinterException
protected void printHeader(Graphics g, PageFormat pageFormat)
g
- the graphics contextpageFormat
- the page format objectprotected void printFooter(Graphics g, PageFormat pageFormat)
g
- the graphics contextpageFormat
- the page format objectpublic void showEarliestObjects()
AbstractGanttChart
Dateline
in such a way that the earliest timeline
objects (stored on the currently visible rows) become visible.showEarliestObjects
in class AbstractGanttChart
public void showLatestObjects()
AbstractGanttChart
Dateline
in such a way that the latest timeline
objects (stored on the currently visible rows) become visible.showLatestObjects
in class AbstractGanttChart
public void showAllObjects()
AbstractGanttChart
Dateline
in such a way that all timeline
objects (stored on the currently visible rows) become visible.showAllObjects
in class AbstractGanttChart
public void showTime(long time, boolean center)
AbstractGanttChart
showTime
in class AbstractGanttChart
time
- the time to make visiblecenter
- if TRUE the time now will be shown in the center / middle of
the layer container, otherwise it will be on the left edge of
the layer containerAbstractGanttChart.showTimeNow(boolean)
public void showTimeNow(boolean center)
AbstractGanttChart
showTimeNow
in class AbstractGanttChart
center
- if TRUE the time now will be shown in the center / middle of
the layer container, otherwise it will be on the left edge of
the layer containerAbstractGanttChart.showTime(long, boolean)
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
public void print(boolean preview, ITimeSpan span)
print
in class AbstractGanttChart
preview
- if TRUE a preview dialog will be shown first before printingspan
- the time span that needs to be printedAbstractGanttChart.print(boolean,
ITimeSpan)
public void expandAll()
expandAll
in class AbstractGanttChart
AbstractGanttChart.expandAll()
public void collapseAll()
collapseAll
in class AbstractGanttChart
AbstractGanttChart.collapseAll()
public void showMessageContext(IMessage msg)
showMessageContext
in class AbstractGanttChart
msg
- the message for which to show the contextAbstractGanttChart.showMessageContext(com.dlsc.flexgantt.swing.IMessage)
public void resetToPreferredSizes()
resetToPreferredSizes
in class AbstractGanttChart
AbstractGanttChart.resetToPreferredSizes()
public void alignEndTimes()
alignEndTimes
in class AbstractGanttChart
AbstractGanttChart.alignEndTimes()
public void alignStartTimes()
alignStartTimes
in class AbstractGanttChart
AbstractGanttChart.alignStartTimes()
public void updateState()
protected void copySettings(AbstractGanttChart from, AbstractGanttChart to, boolean initialCopy)
from
- the source Gantt chartto
- the target Gantt chartinitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)protected void copySettings(TreeTable from, TreeTable to, boolean initialCopy)
from
- the source tree tableto
- the target tree tableinitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)protected void copyExpansionState(TreeTable from, TreeTable to)
from
- the source tree tableto
- the target tree tableprotected void copySettings(TreeTableHeader from, TreeTableHeader to, boolean initialCopy)
from
- the source tree table headerto
- the target tree table headerinitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)protected void copySettings(TreeTableRowHeader from, TreeTableRowHeader to, boolean initialCopy)
from
- the source row headerto
- the target row headerinitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)protected void copySettings(Dateline from, Dateline to, ITimeSpan span, boolean initialCopy)
from
- the source datelineto
- the target datelinespan
- the printed time spaninitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)protected void copySettings(Eventline from, Eventline to, boolean initialCopy)
from
- the source eventlineto
- the target eventlineinitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)protected void copySettings(Timeline from, Timeline to, boolean initialCopy)
from
- the source timelineto
- the target timelineinitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)protected void copySettings(LayerContainer from, LayerContainer to, boolean initialCopy)
from
- the source layer containerto
- the target layer containerinitialCopy
- a flag signalling whether this method gets called for the
first time or for follow up print attempts (some settings
might only need to be copied the first time around, after that
the preview dialog will keep / manage the state of the
printable Gantt)public PreviewDialog getPreviewDialog()
public void setPreviewDialog(PreviewDialog dialog)
dialog
- a preview dialogpublic PrintContext[] getPrintContexts()
AbstractGanttChart
getPrintContexts
in class AbstractGanttChart
public LayerContainerScrollPane[] getLayerContainerScrollPanes()
AbstractGanttChart
getLayerContainerScrollPanes
in class AbstractGanttChart
public TreeTableScrollPane[] getTreeTableScrollPanes()
AbstractGanttChart
getTreeTableScrollPanes
in class AbstractGanttChart
public IGridComponent[] getGridComponents()
AbstractGanttChart
GridControl
instances.getGridComponents
in class AbstractGanttChart
public LayerContainer[] getLayerContainers()
AbstractGanttChart
getLayerContainers
in class AbstractGanttChart
public TreeTable[] getTreeTables()
AbstractGanttChart
getTreeTables
in class AbstractGanttChart
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.