LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing.component
Class LyAbstractTitlePanelManager

java.lang.Object
  extended by leon.view.win.swing.component.LyAbstractTitlePanelManager
Direct Known Subclasses:
LyJTitlePanel._LyJTitlePanelManager

public abstract class LyAbstractTitlePanelManager
extends java.lang.Object

This class manages title panels.


Field Summary
static java.lang.String __VERSION
           
static int FADING
          Fading used for the background color (use 0 for no fading).
static int X_GAP
          Horizontal space between components.
static int Y_GAP
          Vertical space between components.
 
Constructor Summary
LyAbstractTitlePanelManager()
          Default constructor.
LyAbstractTitlePanelManager(java.awt.Image bgImage, java.awt.Image image, java.lang.String imageToolTip, java.awt.Image rightImage, java.lang.String rightImageToolTip, java.lang.String leftLabel, java.lang.String centerLabel, java.lang.String rightLabel, java.awt.Component comp, LyActionListener listener)
          Class constructor of a LyAbstractTitlePanelManager object.
 
Method Summary
 java.awt.Component getComponent()
          Gets the current title bar component.
 java.lang.String getDrawableString(java.lang.String label, int xStart, int xEnd)
          Retrieves the drawable part of the specified string between the starting and ending abscisses.
abstract  java.awt.Image getImageOffScreen(java.awt.Dimension offScreenSize)
          Returns the offscreen image if any.
 java.awt.Rectangle getImageRectangle()
          Gets the main image rectangle.
 java.lang.String getImageToolTip()
          Gets the main image tooltip.
 java.awt.Dimension getMinimumSize()
          Computes minimum size depending on content.
 java.awt.Dimension getPreferredSize()
          Computes preferred size depending on content.
 java.awt.Rectangle getRightImageRectangle()
          Gets the right image rectangle.
 java.lang.String getRightImageToolTip()
          Gets the right image tooltip.
 java.awt.Rectangle getRightLabelRectangle()
          Gets the right label rectangle.
abstract  java.awt.Graphics getTargetGraphics(java.awt.Image offScreenImage, java.awt.Graphics defaultGraphics)
          Returns the graphics context of the specified offscreen image or the default graphics context if none is available.
 void paintCommon(java.awt.Graphics g)
          Draws the title panel in this graphics context.
abstract  void paintOnScreen(java.awt.Image offScreenImage, java.awt.Graphics onScreenGraphics)
          Paints the specified offscreen image to the onscreen graphics context.
 void setCenterLabel(java.lang.String centerLabel)
          Sets the center label parameter.
 void setFading(boolean fading)
          Sets the fading property of the titlebar.
 void setImage(java.awt.Image image)
          Sets the main image.
 void setImageBackgroundColor(java.awt.Color color)
          Sets the titlebar main image background color.
 void setImageBorderColor(java.awt.Color color)
          Sets the titlebar main image border color.
 void setImageToolTip(java.lang.String toolTip)
          Sets the image tooltip.
 void setLeftLabel(java.lang.String leftLabel)
          Sets the left label parameter.
 void setRightImage(java.awt.Image image)
          Sets the right image.
 void setRightImageToolTip(java.lang.String toolTip)
          Sets the right image tooltip.
 void setRightLabel(java.lang.String rightLabel)
          Sets the right label parameter.
 void setTitleBackgroundColor(java.awt.Color color)
          Sets the titlebar background color.
 void setTitleColor(java.awt.Color color)
          Sets the titlebar text color.
 void setTitleFont(java.awt.Font font)
          Sets the titlebar font.
 
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

X_GAP

public static final int X_GAP
Horizontal space between components.

See Also:
Constant Field Values

Y_GAP

public static final int Y_GAP
Vertical space between components.

See Also:
Constant Field Values

FADING

public static final int FADING
Fading used for the background color (use 0 for no fading).

See Also:
Constant Field Values
Constructor Detail

LyAbstractTitlePanelManager

public LyAbstractTitlePanelManager()
Default constructor.


LyAbstractTitlePanelManager

public LyAbstractTitlePanelManager(java.awt.Image bgImage,
                                   java.awt.Image image,
                                   java.lang.String imageToolTip,
                                   java.awt.Image rightImage,
                                   java.lang.String rightImageToolTip,
                                   java.lang.String leftLabel,
                                   java.lang.String centerLabel,
                                   java.lang.String rightLabel,
                                   java.awt.Component comp,
                                   LyActionListener listener)
Class constructor of a LyAbstractTitlePanelManager object. Sets the class fields to the specified values, then initializes those that remained null.

Parameters:
bgImage - the background image
image - the main image of the titlebar
imageToolTip - the main image tooltip
rightImage - the right image of the titlebar
rightImageToolTip - the right image tooltip
leftLabel - the left label on the title
centerLabel - the centered label
rightLabel - the right label
comp - the associated graphical component
listener - the action listener
Method Detail

getImageOffScreen

public abstract java.awt.Image getImageOffScreen(java.awt.Dimension offScreenSize)
Returns the offscreen image if any.

Parameters:
offScreenSize - size of the offscreen image
Returns:
the offscreen image

getTargetGraphics

public abstract java.awt.Graphics getTargetGraphics(java.awt.Image offScreenImage,
                                                    java.awt.Graphics defaultGraphics)
Returns the graphics context of the specified offscreen image or the default graphics context if none is available.

Parameters:
offScreenImage - the image to get its graphics context
defaultGraphics - the default graphics context if the image doesn't have one
Returns:
a graphics context to use

paintOnScreen

public abstract void paintOnScreen(java.awt.Image offScreenImage,
                                   java.awt.Graphics onScreenGraphics)
Paints the specified offscreen image to the onscreen graphics context.

Parameters:
offScreenImage - the offscreen image to paint on the onscreen context
onScreenGraphics - the graphics context to paint the offscreen image on

paintCommon

public void paintCommon(java.awt.Graphics g)
Draws the title panel in this graphics context.

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

getDrawableString

public java.lang.String getDrawableString(java.lang.String label,
                                          int xStart,
                                          int xEnd)
Retrieves the drawable part of the specified string between the starting and ending abscisses. If the string is too large, "..." is added at its end.

Parameters:
label - the label
xStart - start drawing abscisse
xEnd - end drawing abscisse
Returns:
the label that is drawn

getMinimumSize

public java.awt.Dimension getMinimumSize()
Computes minimum size depending on content.

Returns:
the preferred size of the component
See Also:
getPreferredSize()

getPreferredSize

public java.awt.Dimension getPreferredSize()
Computes preferred size depending on content.

Returns:
the preferred size of the component

getComponent

public java.awt.Component getComponent()
Gets the current title bar component.

Returns:
the title bar component

setLeftLabel

public void setLeftLabel(java.lang.String leftLabel)
Sets the left label parameter.

Parameters:
leftLabel - new label

setRightLabel

public void setRightLabel(java.lang.String rightLabel)
Sets the right label parameter.

Parameters:
rightLabel - new label

setCenterLabel

public void setCenterLabel(java.lang.String centerLabel)
Sets the center label parameter.

Parameters:
centerLabel - new label

setImage

public void setImage(java.awt.Image image)
Sets the main image.

Parameters:
image - new image

setImageToolTip

public void setImageToolTip(java.lang.String toolTip)
Sets the image tooltip.

Parameters:
toolTip - new image tooltip
See Also:
getImageToolTip()

setRightImage

public void setRightImage(java.awt.Image image)
Sets the right image.

Parameters:
image - new image

setRightImageToolTip

public void setRightImageToolTip(java.lang.String toolTip)
Sets the right image tooltip.

Parameters:
toolTip - new right image tooltip
See Also:
getRightImageToolTip()

setTitleFont

public void setTitleFont(java.awt.Font font)
Sets the titlebar font.

Parameters:
font - new titleBar font

setTitleBackgroundColor

public void setTitleBackgroundColor(java.awt.Color color)
Sets the titlebar background color.

Parameters:
color - the new titlebar background color

setImageBackgroundColor

public void setImageBackgroundColor(java.awt.Color color)
Sets the titlebar main image background color.

Parameters:
color - the new image background color

setImageBorderColor

public void setImageBorderColor(java.awt.Color color)
Sets the titlebar main image border color.

Parameters:
color - the new image border color

setTitleColor

public void setTitleColor(java.awt.Color color)
Sets the titlebar text color.

Parameters:
color - the new titlebar text color

setFading

public void setFading(boolean fading)
Sets the fading property of the titlebar.

Parameters:
fading - Indicates if the titlebar must be drawn with a fading effect.

getImageRectangle

public java.awt.Rectangle getImageRectangle()
Gets the main image rectangle.

Returns:
the main image rectangle

getRightImageRectangle

public java.awt.Rectangle getRightImageRectangle()
Gets the right image rectangle.

Returns:
the right image rectangle

getRightLabelRectangle

public java.awt.Rectangle getRightLabelRectangle()
Gets the right label rectangle.

Returns:
the right label rectangle

getImageToolTip

public java.lang.String getImageToolTip()
Gets the main image tooltip.

Returns:
the main image tooltip
See Also:
setImageToolTip(String)

getRightImageToolTip

public java.lang.String getRightImageToolTip()
Gets the right image tooltip.

Returns:
the right image tooltip
See Also:
setRightImageToolTip(String)

(c) January 2013 - W4 S.A.

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