LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing.component
Class LyJGanttPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by leon.view.win.swing.component.LyJGanttPanel
All Implemented Interfaces:
java.awt.event.ComponentListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.Scrollable

public class LyJGanttPanel
extends javax.swing.JPanel
implements javax.swing.Scrollable, java.awt.event.ComponentListener

This class is the component where the Abstract Gantt Manager draw the Gantt planning.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static java.lang.String __VERSION
           
 
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
LyJGanttPanel(LyAbstractGanttPanelManager manager)
          Creates a new Gantt panel with the specified Gantt panel manager.
 
Method Summary
 void addNotify()
          When this method is invoked, this component has already a parent.
 void componentHidden(java.awt.event.ComponentEvent e)
          Does nothing.
 void componentMoved(java.awt.event.ComponentEvent e)
          Does nothing.
 void componentResized(java.awt.event.ComponentEvent e)
          Lays out this component when resize.
 void componentShown(java.awt.event.ComponentEvent e)
          Does nothing.
 LyAbstractGanttPanelManager getManager()
          Gets the associated Gantt panel manager.
 java.awt.Dimension getPreferredScrollableViewportSize()
           
 java.awt.Dimension getPreferredSize()
          Computes the preferred size which is based on its parent size.
 int getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
          Gets the number of pixels to scroll a block.
 boolean getScrollableTracksViewportHeight()
          (non-Javadoc).
 boolean getScrollableTracksViewportWidth()
          (non-Javadoc).
 int getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
          Gets the number of pixels to scroll a single unit.
 java.awt.Point getToolTipLocation(java.awt.event.MouseEvent event)
          Gets the left-upper corner of the tooltip.
 java.lang.String getToolTipText()
          Gets the null tooltip text of this planning.
 void layoutPerformed()
          Notifies the planning layout has been done.
 void paintComponent(java.awt.Graphics g)
          Makes the manager draw the map in this panel.
 void setToolTipText(java.lang.String tooltip)
          Doesn't set a tooltip text for this planning.
 boolean superImageUpdate(java.awt.Image img, int flags, int x, int y, int w, int h)
          Deprecated.  
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, hide, 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, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyJGanttPanel

public LyJGanttPanel(LyAbstractGanttPanelManager manager)
Creates a new Gantt panel with the specified Gantt panel manager.

Parameters:
manager - the Gantt panel manager
Method Detail

addNotify

public void addNotify()
When this method is invoked, this component has already a parent.

Overrides:
addNotify in class javax.swing.JComponent
See Also:
Component.addNotify()

paintComponent

public void paintComponent(java.awt.Graphics g)
Makes the manager draw the map in this panel.

Overrides:
paintComponent in class javax.swing.JComponent
See Also:
JComponent.paintComponent(java.awt.Graphics)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Computes the preferred size which is based on its parent size.

Overrides:
getPreferredSize in class javax.swing.JComponent
See Also:
Component.getPreferredSize()

getManager

public LyAbstractGanttPanelManager getManager()
Gets the associated Gantt panel manager.

Returns:
the manager that draw the map in this panel

superImageUpdate

public boolean superImageUpdate(java.awt.Image img,
                                int flags,
                                int x,
                                int y,
                                int w,
                                int h)
Deprecated. 

Accesses the Component.imageUpdate(java.awt.Image, int, int, int, int, int) method.

Parameters:
img - the image being observed
flags - infoflags see imageUpdate for more information
x - the x coordinate
y - the y coordinate
w - the width
h - the height
Returns:
false if the infoflags indicate that the image is completely loaded, true otherwise

getPreferredScrollableViewportSize

public java.awt.Dimension getPreferredScrollableViewportSize()
Specified by:
getPreferredScrollableViewportSize in interface javax.swing.Scrollable
Returns:
the initial preferred size of this map

getScrollableBlockIncrement

public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Gets the number of pixels to scroll a block.

Specified by:
getScrollableBlockIncrement in interface javax.swing.Scrollable
Parameters:
visibleRect - not used in this implementation
orientation - not used in this implementation
direction - not used in this implementation
Returns:
50
See Also:
Scrollable.getScrollableBlockIncrement(java.awt.Rectangle, int, int)

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
(non-Javadoc).

Specified by:
getScrollableTracksViewportHeight in interface javax.swing.Scrollable
See Also:
Scrollable.getScrollableTracksViewportHeight()

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
(non-Javadoc).

Specified by:
getScrollableTracksViewportWidth in interface javax.swing.Scrollable
See Also:
Scrollable.getScrollableTracksViewportWidth()

getScrollableUnitIncrement

public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Gets the number of pixels to scroll a single unit.

Specified by:
getScrollableUnitIncrement in interface javax.swing.Scrollable
Parameters:
visibleRect - not used in this implementation
orientation - not used in this implementation
direction - not used in this implementation
Returns:
10
See Also:
Scrollable.getScrollableUnitIncrement(java.awt.Rectangle, int, int)

setToolTipText

public void setToolTipText(java.lang.String tooltip)
Doesn't set a tooltip text for this planning.

Overrides:
setToolTipText in class javax.swing.JComponent
See Also:
getToolTipText(), JComponent.setToolTipText(java.lang.String)

getToolTipText

public java.lang.String getToolTipText()
Gets the null tooltip text of this planning.

Overrides:
getToolTipText in class javax.swing.JComponent
Returns:
null
See Also:
setToolTipText(String), JComponent.getToolTipText()

getToolTipLocation

public java.awt.Point getToolTipLocation(java.awt.event.MouseEvent event)
Gets the left-upper corner of the tooltip.

Overrides:
getToolTipLocation in class javax.swing.JComponent
Parameters:
event - the mouse event that trigger this getter, not used in this implementation
Returns:
a (0,0) point
See Also:
JComponent.getToolTipLocation(java.awt.event.MouseEvent)

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Does nothing.

Specified by:
componentHidden in interface java.awt.event.ComponentListener
See Also:
ComponentListener.componentHidden(java.awt.event.ComponentEvent)

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Does nothing.

Specified by:
componentMoved in interface java.awt.event.ComponentListener
See Also:
ComponentListener.componentMoved(java.awt.event.ComponentEvent)

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Lays out this component when resize.

Specified by:
componentResized in interface java.awt.event.ComponentListener
See Also:
ComponentListener.componentResized(java.awt.event.ComponentEvent)

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Does nothing.

Specified by:
componentShown in interface java.awt.event.ComponentListener
See Also:
ComponentListener.componentShown(java.awt.event.ComponentEvent)

layoutPerformed

public void layoutPerformed()
Notifies the planning layout has been done. Allows the scrollbars to appear.


(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com