LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing.component
Class LyAbstractCanvasSplitterManager

java.lang.Object
  extended by leon.view.win.swing.component.LyAbstractCanvasSplitterManager
Direct Known Subclasses:
LyJCanvasSplitter._LyCanvasSplitterManager

public abstract class LyAbstractCanvasSplitterManager
extends java.lang.Object

Handles the splitting of an area in multiple coordinated areas.


Field Summary
static java.lang.String __VERSION
           
static short LEFT_HEADER_BOTTOM_PART
          The left header bottom part.
static short LEFT_HEADER_TOP_PART
          The left header top part.
static short MAIN_BOTTOM_LEFT_PART
          The main bottom left part.
static short MAIN_BOTTOM_RIGHT_PART
          The main bottom right part.
static short MAIN_TOP_LEFT_PART
          The main top left part.
static short MAIN_TOP_RIGHT_PART
          The main top right part.
static short NO_PART
          None of possible parts.
static int SCROLLBAR_THICKNESS
          Thickness of the scrollbars.
static int SPLITTER_THICKNESS
          Thickness of the splitters.
static short TOP_HEADER_LEFT_PART
          The top header left part.
static short TOP_HEADER_RIGHT_PART
          The top header right part.
 
Constructor Summary
LyAbstractCanvasSplitterManager(java.awt.Container comp)
          Class constructor of a canvas splitter manager.
 
Method Summary
abstract  java.awt.Component buildSplitter(boolean horizontal)
          Creates a new splitter in the specified orientation.
 void centerCurrentPart()
          Centers the current part on the element currently at the center of the whole canvas.
 LySplittableCanvas getActivatedCanvas()
          Indicates which canvas is activated.
 java.awt.Container getComponent()
          Gets the component linked to this manager.
 java.awt.Point getCurrentPartPosition(boolean mouseOverPart)
          Returns the position of current part.
 java.awt.Dimension getCurrentPartSize(boolean mouseOverPart)
          Returns the size of current part.
 short getDrawnPart()
          Indicates which part is being drawn.
 int getLeftHeaderWidth()
          Returns the width of left header part.
 java.awt.Dimension getMainViewSize()
          Returns the size of the main canvas (the total size of the canvas minus the size of its header).
 java.awt.Dimension getPreferredSize()
          Computes the size of the component, depending on the size of the main canvas.
 java.awt.Dimension getSize()
          Gets the size of the associated component.
 int getTopHeaderHeight()
          Returns the height of top header part.
 int getVerticalOffset(boolean mouseOverPart)
          Returns vertical offset for current part.
 void paintCommon(java.awt.Graphics g)
          Draws the canvas splitter in this graphics.
 void redraw()
          Redraws the component.
 void scrollX(int scrollX)
          Performs an horizontal scrolling on the left or right splitter (depending on the canvas under the mouse).
 void scrollY(int scrollY)
          Performs a vertical scrolling on the top or bottom splitter (depending on the canvas under the mouse).
 void setActivated(LySplittableCanvas canvas)
          Activates a canvas.
 void setLeftHeaderCanvas(LySplittableCanvas canvas)
          Sets the left header canvas of this splitter.
 void setMainCanvas(LySplittableCanvas canvas)
          Sets the main canvas of this splitter.
 void setTopHeaderCanvas(LySplittableCanvas canvas)
          Sets the top header canvas of this splitter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

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

NO_PART

public static final short NO_PART
None of possible parts.

See Also:
Constant Field Values

MAIN_TOP_LEFT_PART

public static final short MAIN_TOP_LEFT_PART
The main top left part.

See Also:
Constant Field Values

MAIN_TOP_RIGHT_PART

public static final short MAIN_TOP_RIGHT_PART
The main top right part.

See Also:
Constant Field Values

MAIN_BOTTOM_LEFT_PART

public static final short MAIN_BOTTOM_LEFT_PART
The main bottom left part.

See Also:
Constant Field Values

MAIN_BOTTOM_RIGHT_PART

public static final short MAIN_BOTTOM_RIGHT_PART
The main bottom right part.

See Also:
Constant Field Values

TOP_HEADER_LEFT_PART

public static final short TOP_HEADER_LEFT_PART
The top header left part.

See Also:
Constant Field Values

TOP_HEADER_RIGHT_PART

public static final short TOP_HEADER_RIGHT_PART
The top header right part.

See Also:
Constant Field Values

LEFT_HEADER_TOP_PART

public static final short LEFT_HEADER_TOP_PART
The left header top part.

See Also:
Constant Field Values

LEFT_HEADER_BOTTOM_PART

public static final short LEFT_HEADER_BOTTOM_PART
The left header bottom part.

See Also:
Constant Field Values

SPLITTER_THICKNESS

public static final int SPLITTER_THICKNESS
Thickness of the splitters.

See Also:
Constant Field Values

SCROLLBAR_THICKNESS

public static final int SCROLLBAR_THICKNESS
Thickness of the scrollbars.

See Also:
Constant Field Values
Constructor Detail

LyAbstractCanvasSplitterManager

public LyAbstractCanvasSplitterManager(java.awt.Container comp)
Class constructor of a canvas splitter manager.

Parameters:
comp - the splitted component
Method Detail

buildSplitter

public abstract java.awt.Component buildSplitter(boolean horizontal)
Creates a new splitter in the specified orientation.

Parameters:
horizontal - Indicates if the splitter is oriented horizontally (true) or vertically (false).
Returns:
a new splitted component

setMainCanvas

public void setMainCanvas(LySplittableCanvas canvas)
Sets the main canvas of this splitter. Main canvas may be splitted into 4 parts.

Parameters:
canvas - the main canvas of this splitter

setTopHeaderCanvas

public void setTopHeaderCanvas(LySplittableCanvas canvas)
Sets the top header canvas of this splitter. Top header canvas may be splitted into 2 parts (left and right).

Parameters:
canvas - the top header canvas of this splitter

setLeftHeaderCanvas

public void setLeftHeaderCanvas(LySplittableCanvas canvas)
Sets the left header canvas of this splitter. Left header canvas may be splitted into 2 parts (top and bottom).

Parameters:
canvas - the left header canvas of this splitter

getComponent

public java.awt.Container getComponent()
Gets the component linked to this manager.

Returns:
the associated component

redraw

public void redraw()
Redraws the component.


getMainViewSize

public java.awt.Dimension getMainViewSize()
Returns the size of the main canvas (the total size of the canvas minus the size of its header).

Returns:
the size of the main canvas

getVerticalOffset

public int getVerticalOffset(boolean mouseOverPart)
Returns vertical offset for current part. Current part may be part which has the mouse over or drawn part.

Parameters:
mouseOverPart - true if mouse over part must be considered, false if draw part must be considered
Returns:
vertical offset for current part

getCurrentPartSize

public java.awt.Dimension getCurrentPartSize(boolean mouseOverPart)
Returns the size of current part. Current part may be part which has the mouse over or drawn part.

Parameters:
mouseOverPart - true if mouse over part must be considered, false if draw part must be considered
Returns:
the size of current part

getCurrentPartPosition

public java.awt.Point getCurrentPartPosition(boolean mouseOverPart)
Returns the position of current part. Current part may be part which has the mouse over or drawn part.

Parameters:
mouseOverPart - true if mouse over part must be considered, false if draw part must be considered
Returns:
the position of current part

getLeftHeaderWidth

public int getLeftHeaderWidth()
Returns the width of left header part.

Returns:
the width of left header part

getTopHeaderHeight

public int getTopHeaderHeight()
Returns the height of top header part.

Returns:
the height of top header part

getPreferredSize

public java.awt.Dimension getPreferredSize()
Computes the size of the component, depending on the size of the main canvas.

Returns:
the preferred size of the component

getDrawnPart

public short getDrawnPart()
Indicates which part is being drawn.

Returns:
the part that is being drawn. The result is one of the following:

setActivated

public void setActivated(LySplittableCanvas canvas)
Activates a canvas.

Parameters:
canvas - the canvas that must be activated

getActivatedCanvas

public LySplittableCanvas getActivatedCanvas()
Indicates which canvas is activated.

Returns:
the activated canvas

scrollX

public void scrollX(int scrollX)
Performs an horizontal scrolling on the left or right splitter (depending on the canvas under the mouse).

Parameters:
scrollX - the new scroll position

centerCurrentPart

public void centerCurrentPart()
Centers the current part on the element currently at the center of the whole canvas.


scrollY

public void scrollY(int scrollY)
Performs a vertical scrolling on the top or bottom splitter (depending on the canvas under the mouse).

Parameters:
scrollY - the new scroll position

getSize

public java.awt.Dimension getSize()
Gets the size of the associated component.

Returns:
the size of the component.
See Also:
Component.getSize()

paintCommon

public void paintCommon(java.awt.Graphics g)
Draws the canvas splitter in this graphics.

Parameters:
g - the graphics context to paint the images on

(c) January 2013 - W4 S.A.

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