|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--org.fopps.ui.project.ProjectPanel
ProjectPanel displays scheduling and relations of products and assets
| Field Summary | |
static int |
BAR_GAP
|
static int |
BAR_GAP_2
|
static double |
MAX_ZOOM
|
static double |
MIN_ZOOM
|
static int |
NORMAL_FONTSIZE
|
static int |
NORMAL_TIMEWIDTH
|
static int |
TEXT_GAP
|
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ProjectPanel(ProjectContainer pProjects)
Constructor for ProjectPanel. |
|
| Method Summary | |
void |
addItemListener(java.awt.event.ItemListener pListener)
Adds a listener |
void |
addToSelection(AbstractItem pItem)
Removes an item from selection. |
boolean |
allowMultipleSelection()
Returns true if view allows multiple selection. |
boolean |
canZoom()
Returns true if view can be zoomed |
void |
clearSelection()
Removes all selected elements from selection |
void |
configChanged(java.lang.String pKey,
java.lang.Object pValue)
Notifies listener that a configuration item has changed |
protected void |
emitItemEvent(java.awt.event.ItemEvent pEvent)
|
double |
getHorzZoomFactor()
|
int |
getLineHeight()
Returns the lineHeight. |
AbstractItem |
getObjectFromPoint(int x,
int y)
Returns the corresponding item of a coordinate pair. |
AbstractItem |
getObjectFromPoint(java.awt.Point p)
Returns the corresponding item to a given point. |
ProjectContainer |
getProjects()
|
ProjectItemRenderer |
getRenderer()
Returns the current renderer |
java.lang.Object[] |
getSelectedObjects()
|
int |
getTimeWidth()
Returns the timeWidth. |
double |
getZoomFactor()
|
void |
invertSelection()
Inverts current selection |
boolean |
isShowGrid()
Returns the showGrid. |
boolean |
isShowTRef()
Returns the showTRef. |
void |
modelChanged(ModelEvent ev)
Invoked on model changes. |
void |
narrow()
Narrows current view, if applicable |
protected void |
notifyChange(AbstractItem pItem)
|
protected void |
notifySelection(AbstractItem pItem)
|
protected void |
notifyUnselection(AbstractItem pItem)
|
void |
paint(java.awt.Graphics g)
|
protected void |
paintComponent(java.awt.Graphics arg0)
|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Prints the page at the specified index into the specified Graphics context in the specified
format. |
void |
removeAllItemListener()
Removes all listeners |
void |
removeFromSelection(AbstractItem pItem)
Removes an item from selection. |
void |
removeItemListener(java.awt.event.ItemListener pListener)
Removes a listener |
protected void |
repaintLater()
|
void |
resetZoom()
|
void |
selectAll()
Selects all items in a view |
void |
selectItem(java.lang.Object pObject)
Select an object in the view |
void |
setContainer(ProjectContainer pContainer)
Sets the container |
void |
setProjects(ProjectContainer pProjects)
|
void |
setRenderer(ProjectItemRenderer pRenderer)
|
void |
setShowGrid(boolean showGrid)
Sets the showGrid. |
void |
setShowTRef(boolean showTRef)
Sets the showTRef. |
void |
setTimeWidth(int timeWidth)
Sets the timeWidth. |
void |
toggleSelection(AbstractItem pItem,
boolean pExtendSelection)
Adds an item to selection. |
void |
unselectAll()
Unselects all items in a view. |
void |
widen()
Widens current view, if applicable |
void |
zoomIn()
Zooms current view, if applicable |
void |
zoomOut()
Unzooms current view, if applicable |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, 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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final double MAX_ZOOM
public static final double MIN_ZOOM
public static final int NORMAL_TIMEWIDTH
public static final int NORMAL_FONTSIZE
public static final int TEXT_GAP
public static final int BAR_GAP
public static final int BAR_GAP_2
| Constructor Detail |
public ProjectPanel(ProjectContainer pProjects)
| Method Detail |
public double getZoomFactor()
public double getHorzZoomFactor()
public void zoomOut()
ViewActionReceiver
zoomOut in interface ViewActionReceiverpublic void zoomIn()
ViewActionReceiver
zoomIn in interface ViewActionReceiverpublic void resetZoom()
public void narrow()
ViewActionReceiver
narrow in interface ViewActionReceiverpublic void widen()
ViewActionReceiver
widen in interface ViewActionReceiverpublic boolean canZoom()
canZoom in interface ViewActionReceiverpublic int getLineHeight()
public boolean isShowGrid()
public boolean isShowTRef()
public int getTimeWidth()
public ProjectItemRenderer getRenderer()
public void setRenderer(ProjectItemRenderer pRenderer)
public void setShowGrid(boolean showGrid)
showGrid - The showGrid to setpublic void setShowTRef(boolean showTRef)
showTRef - The showTRef to setpublic void setTimeWidth(int timeWidth)
timeWidth - The timeWidth to setpublic ProjectContainer getProjects()
public void setContainer(ProjectContainer pContainer)
ContainerSelectable
setContainer in interface ContainerSelectablepublic void setProjects(ProjectContainer pProjects)
protected void paintComponent(java.awt.Graphics arg0)
paintComponent in class javax.swing.JComponentJComponent.paintComponent(Graphics)public void paint(java.awt.Graphics g)
paint in class javax.swing.JComponentComponent.paint(Graphics)
public int print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
throws java.awt.print.PrinterException
Graphics context in the specified
format. A PrinterJob calls the
Printable interface to request that a page be
rendered into the context specified by
graphics. The format of the page to be drawn is
specified by pageFormat. The zero based index
of the requested page is specified by pageIndex.
If the requested page does not exist then this method returns
NO_SUCH_PAGE; otherwise PAGE_EXISTS is returned.
The Graphics class or subclass implements the
PrinterGraphics interface to provide additional
information. If the Printable object
aborts the print job then it throws a PrinterException.
print in interface java.awt.print.Printablegraphics - the context into which the page is drawnpageFormat - the size and orientation of the page being drawnpageIndex - the zero based index of the page to be drawn
pageIndex specifies a
non-existent page.
java.awt.print.PrinterException - thrown when the print job is terminated.
public AbstractItem getObjectFromPoint(int x,
int y)
x - X coordinatey - Y coordinatepublic AbstractItem getObjectFromPoint(java.awt.Point p)
getObjectFromPoint(int,int)public void modelChanged(ModelEvent ev)
ModelListener
modelChanged in interface ModelListenerev - Model eventModelEventpublic void addItemListener(java.awt.event.ItemListener pListener)
addItemListener in interface java.awt.ItemSelectablepublic void removeItemListener(java.awt.event.ItemListener pListener)
removeItemListener in interface java.awt.ItemSelectablepublic void removeAllItemListener()
public java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface java.awt.ItemSelectablepublic void selectAll()
selectAll in interface ViewActionReceiverpublic void unselectAll()
clearSelection.
unselectAll in interface ViewActionReceiverorg.fopps.ui.ProjectPanel#clearSelection()public void invertSelection()
invertSelection in interface ViewActionReceiverpublic void selectItem(java.lang.Object pObject)
selectItem in interface ViewActionReceiverpObject - Object to select in viewpublic boolean allowMultipleSelection()
allowMultipleSelection in interface ViewActionReceiverpublic void clearSelection()
public void toggleSelection(AbstractItem pItem,
boolean pExtendSelection)
pItem - Item to addpExtendSelection - If true, the previous selection will be kept. If false, all previous selected
items will be unselectedpublic void addToSelection(AbstractItem pItem)
pItem - Item to add to selectionpublic void removeFromSelection(AbstractItem pItem)
pItem - Item to remove from selection
public void configChanged(java.lang.String pKey,
java.lang.Object pValue)
configChanged in interface ConfigListenerpKey - Name of the optionpValue - New value of optionprotected void notifySelection(AbstractItem pItem)
protected void notifyUnselection(AbstractItem pItem)
protected void notifyChange(AbstractItem pItem)
protected void emitItemEvent(java.awt.event.ItemEvent pEvent)
protected void repaintLater()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||