|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
leon.view.win.swing.component.LyJBorderPanel
public class LyJBorderPanel
This class implements a panel who can have severals types of border corresponding to the Leonardi's style.
Nested Class Summary | |
---|---|
class |
LyJBorderPanel._LyJBorderPanelClosableBorder
Internal class used to draw a closable border. |
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
|
static int |
CENTER
Center alignment. |
static int |
DEFAULT_ALIGNMENT
Default alignment: LEFT . |
static java.awt.Color |
DEFAULT_COLOR
Default color: black. |
static java.awt.Font |
DEFAULT_FONT
Default font: TimesRoman, PLAIN, 14. |
static int |
DEFAULT_GAP
Default gap between border and contained component: 1 pixel. |
static int |
DEFAULT_IN_THICKNESS
Default thickness for etched-in borders: 10 pixels. |
static int |
DEFAULT_LOWERED_THICKNESS
Default thickness for lowered borders: 2 pixels. |
static int |
DEFAULT_OUT_THICKNESS
Default thickness for etched-out borders: 10 pixels. |
static int |
DEFAULT_RAISED_THICKNESS
Default thickness for raised borders: 2 pixels. |
static int |
DEFAULT_SOLID_THICKNESS
Default thickness for solid borders: 1 pixel. |
static int |
DEFAULT_THICKNESS
Default thickness: 10 pixels. |
static int |
LEFT
Left alignment. |
static int |
RIGHT
Right alignment. |
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 | |
---|---|
LyJBorderPanel()
Default constructor. |
|
LyJBorderPanel(java.awt.Color color,
int thickness)
Class constructor of a new JBorder Panel object. |
|
LyJBorderPanel(LyAreaBase.Border style)
Class constructor of a new JBorder Panel object. |
|
LyJBorderPanel(LyAreaBase.Border style,
int thickness)
Class constructor of a new JBorder Panel object. |
|
LyJBorderPanel(java.lang.String text)
Class constructor. |
Method Summary | |
---|---|
static javax.swing.border.Border |
createBorder(LyAreaBase.Border style)
Creates a reusable border for other components. |
static javax.swing.border.Border |
createBorder(LyAreaBase.Border style,
int thickness,
int gap,
java.awt.Color color)
Creates a reusable border for other components. |
static javax.swing.border.Border |
createBorder(LyAreaBase.Border style,
int thickness,
int gap,
java.awt.Color color,
java.awt.Font font,
int alignment,
java.lang.String text)
This method allows another component to have the same border's style than a LyBorderPanel. |
int |
getAlignment()
Gets the text alignment. |
java.awt.Rectangle |
getBounds()
|
java.awt.Color |
getColor()
Gets the current color for SOLID borders and the caption text color for etched borders. |
int |
getGap()
Gets the gap between the border and the contained Component. |
java.awt.Dimension |
getPreferredSize()
|
LyAreaBase.Border |
getStyle()
Gets the style of the border. |
java.lang.String |
getText()
Gets the text. |
java.awt.Font |
getTextFont()
Gets the font of the text. |
int |
getThickness()
Gets the thickness of the border. |
LyJBorderPanel |
setAlignment(int alignment)
Sets the text alignment. |
void |
setClosable(boolean closable)
Sets the closable state of the panel. |
LyJBorderPanel |
setColor(java.awt.Color color)
Sets the current color for SOLID borders and the caption text color for etched borders. |
LyJBorderPanel |
setGap(int gap)
Sets the gap between the border and the contained Component. |
void |
setOpen(boolean open)
Sets the open state of the panel. |
void |
setOpenCloseImages(java.awt.Image openImage,
java.awt.Image closeImage)
Sets the images used to open / close the panel. |
void |
setParentView(LyView view)
Sets the parent LyView instance of this panel. |
LyJBorderPanel |
setStyle(LyAreaBase.Border style)
Sets the style of the border. |
LyJBorderPanel |
setText(java.lang.String text)
Sets the text. |
LyJBorderPanel |
setTextFont(java.awt.Font font)
Sets the font. |
LyJBorderPanel |
setThickness(int thickness)
Sets the thickness of the border. |
void |
updateBorder()
Sets the border of this component depending on its style value. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, 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, getToolTipLocation, getToolTipText, 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, setToolTipText, 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, 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 |
---|
public static final java.lang.String __VERSION
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int DEFAULT_THICKNESS
public static final int DEFAULT_SOLID_THICKNESS
public static final int DEFAULT_RAISED_THICKNESS
public static final int DEFAULT_LOWERED_THICKNESS
public static final int DEFAULT_IN_THICKNESS
public static final int DEFAULT_OUT_THICKNESS
public static final int DEFAULT_GAP
public static final java.awt.Color DEFAULT_COLOR
public static final java.awt.Font DEFAULT_FONT
public static final int DEFAULT_ALIGNMENT
LEFT
. Only applies to etched borders.
Constructor Detail |
---|
public LyJBorderPanel()
public LyJBorderPanel(java.lang.String text)
#IN
border with given text caption.
text
- the text captionpublic LyJBorderPanel(java.awt.Color color, int thickness)
#SOLID
border with color and
thickness given.
color
- the color for the borderthickness
- the thickness of the borderpublic LyJBorderPanel(LyAreaBase.Border style)
style
- the style for this border. May be one of the following:
#SOLID
#RAISED
#LOWERED
#IN
#OUT
TransferHandler.NONE
public LyJBorderPanel(LyAreaBase.Border style, int thickness)
style
- the style for this borderthickness
- the thickness for this border#LyJBorderPanel(int)
Method Detail |
---|
public LyJBorderPanel setStyle(LyAreaBase.Border style)
style
- the new style
getStyle()
public LyAreaBase.Border getStyle()
#setStyle(int)
public void updateBorder()
public static javax.swing.border.Border createBorder(LyAreaBase.Border style)
style
- the style of the border
public static javax.swing.border.Border createBorder(LyAreaBase.Border style, int thickness, int gap, java.awt.Color color)
style
- the style of the borderthickness
- the thicknessgap
- the gapcolor
- the color of the border
public static javax.swing.border.Border createBorder(LyAreaBase.Border style, int thickness, int gap, java.awt.Color color, java.awt.Font font, int alignment, java.lang.String text)
style
- the style of the borderthickness
- the thicknessgap
- the gapcolor
- the color of the borderfont
- the font to usealignment
- the alignment policytext
- the text of the title
public LyJBorderPanel setThickness(int thickness)
thickness
- the new thickness
getThickness()
public int getThickness()
setThickness(int)
public void setClosable(boolean closable)
closable
- the new closable statepublic void setOpenCloseImages(java.awt.Image openImage, java.awt.Image closeImage)
openImage
- the image to be used to open panelcloseImage
- the image to be used to close panel#setClosable()
public void setOpen(boolean open)
open
- the new open state#setClosable()
public void setParentView(LyView view)
public LyJBorderPanel setGap(int gap)
gap
- the new gap, in pixels
getGap()
public int getGap()
setGap(int)
public LyJBorderPanel setColor(java.awt.Color color)
color
- the new color
getColor()
public java.awt.Color getColor()
setColor(Color)
public LyJBorderPanel setTextFont(java.awt.Font font)
font
- the font for the etched borders
getTextFont()
public java.awt.Font getTextFont()
setTextFont(Font)
public LyJBorderPanel setText(java.lang.String text)
text
- the new text
getText()
public java.lang.String getText()
setText(String)
public LyJBorderPanel setAlignment(int alignment)
alignment
- the new alignment
getAlignment()
public int getAlignment()
setAlignment(int)
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public java.awt.Rectangle getBounds()
getBounds
in class java.awt.Component
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |