org.smartui
Class SuperLabel3D

java.lang.Object
  |
  +--java.awt.Component
        |
        +--org.smartui.SmartComponent
              |
              +--org.smartui.Label3D
                    |
                    +--org.smartui.SuperLabel3D
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, Smart
Direct Known Subclasses:
SuperButton

public class SuperLabel3D
extends Label3D

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static int AUTOSIZEIMAGE
          The showing style of this component
 int bevelInner
           
 int bevelOuter
           
 int bevelWidth
           
 boolean border
           
 java.awt.Color borderColor
           
 int borderWidth
           
static int CENTEREDIMAGE
          The showing style of this component
 java.awt.Color[] colors
           
static int CUSTOMGRADIENT
          The showing style of this component
static int ELLIPSEGRADIENT
          The showing style of this component
static int FITIMAGE
          The showing style of this component
 int gradientUnitSize
           
static int HORZLINEGRADIENT
          The showing style of this component
 java.awt.Image image
           
 java.lang.String imageUrl
           
static int LOWERED
          The bevel style used of component's bevel border
 int marginX
           
 int marginY
           
static int NO
          The bevel style used of component's bevel border
static int NONE
          The showing style of this component
static int NORMALIMAGE
          The showing style of this component
static int RAISED
          The bevel style used of component's bevel border
static int RECTGRADIENT
          The showing style of this component
 int superStyle
           
static int TILEDIMAGE
          The showing style of this component
static int VERTLINEGRADIENT
          The showing style of this component
 
Fields inherited from class org.smartui.Label3D
align, autosize, BOTTOM, hAlign, HCENTER, LEFT, LINECENTER, lineGap, LINELEFT, LINERIGHT, lineWidth, NORMAL, OUTLINE, outlineColor, RAISE3D, RIGHT, separateLength, shadowColor, shadowHeight, style, SUNK3D, text, TOP, vAlign, VCENTER
 
Fields inherited from class org.smartui.SmartComponent
cliprect, transparent
 
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
SuperLabel3D()
           
SuperLabel3D(int bevelOuter, int bevelInner, int bevelWidth, boolean border, int borderWidth)
          Creates a new instance of SuperLabel3D.
SuperLabel3D(java.lang.String text)
           
SuperLabel3D(java.lang.String strURL, int imageStyle)
          Creates a new instance of SuperLabel3D. with the image's url and the imagestyle
 
Method Summary
protected  void doPaint(java.awt.Graphics g, int x, int y, java.awt.Dimension dim)
           
protected  void fastLineGrad(java.awt.Graphics g, java.awt.Rectangle rect)
          paint this linegradient
protected  void frame3D(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color topColor, java.awt.Color bottomColor, int lineWidth)
           
 int getMarginBorder()
          Get the margin of the border, it is same at X and Y It is calculated according the border and the bevel
 java.awt.Dimension getMinimumSize()
          Gets the mininimum size of this component.
 java.awt.Dimension getPreferredSize()
          Gets the preferred size of this component.
protected  void lineGradient(java.awt.Graphics g, java.awt.Rectangle rect)
          paint this linegradient
protected  void onDrawRect(java.awt.Graphics g, java.awt.Rectangle rect)
          customized paint of gradient, can inherited by sub component default is same as the RECTGRADIENT
protected  void otherGradient(java.awt.Graphics g, java.awt.Rectangle rect)
          paint the gradient not line
protected  void paintAllEffect(java.awt.Graphics g, java.awt.Rectangle rect)
          paint this component according the style
protected  void paintCenteredImage(java.awt.Graphics g, java.awt.Rectangle rect)
          paint the centered image
protected  void paintTiledImage(java.awt.Graphics g, java.awt.Rectangle rect)
          paint the tiled image
 void set(int bevelOuter, int bevelInner, int bevelWidth, boolean border, int borderWidth)
          Sets the border's bevel propertys of this component.
 void setImageFromUrl(java.lang.String url)
           
 
Methods inherited from class org.smartui.Label3D
getTextDimension, paint, propertyChanged, rejustSize, setAlign, setFont, setLabel3D, sizeToFit
 
Methods inherited from class org.smartui.SmartComponent
getBackground, getFather, getFont, getForeground, getParent, isShowing, isValid, setFather, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFontMetrics, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
The showing style of this component

HORZLINEGRADIENT

public static final int HORZLINEGRADIENT
The showing style of this component

VERTLINEGRADIENT

public static final int VERTLINEGRADIENT
The showing style of this component

ELLIPSEGRADIENT

public static final int ELLIPSEGRADIENT
The showing style of this component

RECTGRADIENT

public static final int RECTGRADIENT
The showing style of this component

CUSTOMGRADIENT

public static final int CUSTOMGRADIENT
The showing style of this component

TILEDIMAGE

public static final int TILEDIMAGE
The showing style of this component

CENTEREDIMAGE

public static final int CENTEREDIMAGE
The showing style of this component

FITIMAGE

public static final int FITIMAGE
The showing style of this component

NORMALIMAGE

public static final int NORMALIMAGE
The showing style of this component

AUTOSIZEIMAGE

public static final int AUTOSIZEIMAGE
The showing style of this component

NO

public static final int NO
The bevel style used of component's bevel border

LOWERED

public static final int LOWERED
The bevel style used of component's bevel border

RAISED

public static final int RAISED
The bevel style used of component's bevel border

superStyle

public int superStyle

gradientUnitSize

public int gradientUnitSize

colors

public java.awt.Color[] colors

borderColor

public java.awt.Color borderColor

bevelWidth

public int bevelWidth

bevelOuter

public int bevelOuter

bevelInner

public int bevelInner

borderWidth

public int borderWidth

border

public boolean border

imageUrl

public java.lang.String imageUrl

image

public java.awt.Image image

marginX

public int marginX

marginY

public int marginY
Constructor Detail

SuperLabel3D

public SuperLabel3D()

SuperLabel3D

public SuperLabel3D(java.lang.String text)

SuperLabel3D

public SuperLabel3D(int bevelOuter,
                    int bevelInner,
                    int bevelWidth,
                    boolean border,
                    int borderWidth)
Creates a new instance of SuperLabel3D.

SuperLabel3D

public SuperLabel3D(java.lang.String strURL,
                    int imageStyle)
Creates a new instance of SuperLabel3D. with the image's url and the imagestyle
Method Detail

set

public void set(int bevelOuter,
                int bevelInner,
                int bevelWidth,
                boolean border,
                int borderWidth)
Sets the border's bevel propertys of this component.

setImageFromUrl

public void setImageFromUrl(java.lang.String url)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Gets the preferred size of this component. It will calc the preferred size according of the label3D or according the image when the superStyle is AUTOSIZEIMAGE
Overrides:
getPreferredSize in class Label3D
Returns:
A dimension object indicating this component's preferred size.

getMinimumSize

public java.awt.Dimension getMinimumSize()
Description copied from class: Label3D
Gets the mininimum size of this component.
Overrides:
getMinimumSize in class Label3D
Following copied from class: org.smartui.Label3D
Returns:
A dimension object indicating this component's minimum size.
See Also:
Label3D.getPreferredSize()

getMarginBorder

public int getMarginBorder()
Get the margin of the border, it is same at X and Y It is calculated according the border and the bevel

doPaint

protected void doPaint(java.awt.Graphics g,
                       int x,
                       int y,
                       java.awt.Dimension dim)
Overrides:
doPaint in class Label3D

paintAllEffect

protected void paintAllEffect(java.awt.Graphics g,
                              java.awt.Rectangle rect)
paint this component according the style

fastLineGrad

protected void fastLineGrad(java.awt.Graphics g,
                            java.awt.Rectangle rect)
paint this linegradient

lineGradient

protected void lineGradient(java.awt.Graphics g,
                            java.awt.Rectangle rect)
paint this linegradient

otherGradient

protected void otherGradient(java.awt.Graphics g,
                             java.awt.Rectangle rect)
paint the gradient not line

onDrawRect

protected void onDrawRect(java.awt.Graphics g,
                          java.awt.Rectangle rect)
customized paint of gradient, can inherited by sub component default is same as the RECTGRADIENT

paintTiledImage

protected void paintTiledImage(java.awt.Graphics g,
                               java.awt.Rectangle rect)
paint the tiled image

paintCenteredImage

protected void paintCenteredImage(java.awt.Graphics g,
                                  java.awt.Rectangle rect)
paint the centered image

frame3D

protected void frame3D(java.awt.Graphics g,
                       int x,
                       int y,
                       int width,
                       int height,
                       java.awt.Color topColor,
                       java.awt.Color bottomColor,
                       int lineWidth)