com.alee.laf.panel
Class WebPanel

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 com.alee.laf.panel.WebPanel
All Implemented Interfaces:
PartialDecoration, LanguageContainerMethods, ShapeProvider, Styleable, SizeMethods<WebPanel>, SwingMethods, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Direct Known Subclasses:
AlignPanel, BorderPanel, CenterPanel, ComponentTransition, DoubleColorField, EmptyPanel, FlowPanel, GridPanel, GroupPanel, IconProgress, LanguageEditor, LineColorChooser, NinePatchEditorPanel, PaletteColorChooser, PopupLayer, ResizablePanel, SingleAlignPanel, SourceViewer, TwoSidesPanel, VerticalPanel, WebAccordion, WebBreadcrumb, WebBreadcrumbPanel, WebButtonGroup, WebCalendar, WebCheckBoxTreeCellRenderer, WebCollapsiblePane, WebColorChooserPanel, WebComponentPanel, WebComponentPanel.WebSelectablePanel, WebDirectoryChooserPanel, WebDockableFrame, WebDockablePane, WebDocumentPane, WebFileChooserField, WebFileChooserField.FilePlate, WebFileChooserPanel, WebFileDrop, WebFilePlate, WebGlassPane, WebHeavyWeightPopup, WebOverlay, WebPathField, WebPopup, WebSwitch, WebSwitchGripper, WebSwitchPane, WebTitledPanel, WebToolBarCorner, WrapPanel

public class WebPanel
extends javax.swing.JPanel
implements Styleable, ShapeProvider, PartialDecoration, SizeMethods<WebPanel>, LanguageContainerMethods

This JPanel extension class provides a direct access to WebPanelUI methods. By default WebPanel uses BorderLayout instead of FlowLayout (unlike JPanel).

This component should never be used with a non-Web UIs as it might cause an unexpected behavior. You could still use that component even if WebLaF is not your application L&F as this component will use Web-UI in any case.

Author:
Mikle Garin
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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
WebPanel()
          Constructs new panel.
WebPanel(boolean decorated)
          Constructs new panel which is either decorated or undecorated.
WebPanel(boolean decorated, java.awt.Component component)
          Constructs new panel which is either decorated or undecorated.
WebPanel(boolean decorated, java.awt.LayoutManager layout)
          Constructs new panel with the specified layout which is either decorated or undecorated.
WebPanel(java.awt.Component component)
          Constructs new panel with the specified component automatically added into panel's center area.
WebPanel(java.awt.LayoutManager layout)
          Constructs new panel with the specified layout.
WebPanel(java.awt.LayoutManager layout, boolean isDoubleBuffered)
          Constructs new panel with the specified layout and double-buffered mark.
WebPanel(java.awt.LayoutManager layout, java.awt.Component... components)
          Constructs new panel with the specified layout.
WebPanel(java.awt.LayoutManager layout, Painter painter)
          Constructs new panel with the specified layout and painter.
WebPanel(java.awt.LayoutManager layout, Painter painter, java.awt.Component... components)
          Constructs new panel with the specified layout and painter.
WebPanel(Painter painter)
          Constructs new panel with the specified painter.
WebPanel(Painter painter, java.awt.Component component)
          Constructs new panel with the specified painter.
WebPanel(java.lang.String styleId)
          Constructs new panel with the specified style ID.
WebPanel(java.lang.String styleId, java.awt.Component component)
          Constructs new panel with the specified style ID.
WebPanel(java.lang.String styleId, java.awt.LayoutManager layout)
          Constructs new panel with the specified style ID.
 
Method Summary
 WebPanel add(java.awt.Component... components)
          Adds all specified components into the panel.
 WebPanel add(int index, java.awt.Component... components)
          Adds all components into the panel under the specified index.
 WebPanel add(java.util.List<? extends java.awt.Component> components)
          Adds all components from the list into the panel.
 WebPanel add(java.util.List<? extends java.awt.Component> components, int index)
          Adds all components from the list into the panel under the specified index.
 WebPanel add(java.util.List<? extends java.awt.Component> components, java.lang.String constraints)
          Adds all components from the list into the panel under the specified constraints.
 WebPanel add(java.lang.String constraints, java.awt.Component... components)
          Adds all components into the panel under the specified constraints.
 java.awt.Color getBorderColor()
          Returns decoration border color.
 java.awt.Stroke getBorderStroke()
          Returns decoration border stroke.
 java.awt.Color getDisabledBorderColor()
          Returns decoration disabled border color.
 java.awt.Component getFirstComponent()
          Returns first component contained in this panel.
 java.lang.String getLanguageContainerKey()
          Returns language container key for container which implements this interface.
 java.awt.Component getLastComponent()
          Returns last component contained in this panel.
 java.awt.Insets getMargin()
          Returns panel margin.
 int getMinimumHeight()
          Returns component minimum height.
 int getMinimumWidth()
          Returns component minimum width.
 Painter getPainter()
          Returns panel painter.
 int getPreferredHeight()
          Returns component preferred height.
 java.awt.Dimension getPreferredSize()
          Returns component preferred size.
 int getPreferredWidth()
          Returns component preferred width.
 int getRound()
          Returns decoration corners rounding.
 float getShadeTransparency()
          Returns decoration shade transparency.
 int getShadeWidth()
          Returns decoration shade width.
 java.lang.String getStyleId()
          Returns component style ID.
 WebPanelUI getWebUI()
          Returns Web-UI applied to this class.
 boolean isPaintBackground()
          Returns whether should paint decoration background or not.
 boolean isPaintBottom()
          Returns whether should paint bottom side or not.
 boolean isPaintBottomLine()
          Returns whether should paint bottom side line or not.
 boolean isPaintFocus()
          Returns whether focus should be painted or not.
 boolean isPaintLeft()
          Returns whether should paint left side or not.
 boolean isPaintLeftLine()
          Returns whether should paint left side line or not.
 boolean isPaintRight()
          Returns whether should paint right side or not.
 boolean isPaintRightLine()
          Returns whether should paint right side line or not.
 boolean isPaintTop()
          Returns whether should paint top side or not.
 boolean isPaintTopLine()
          Returns whether should paint top side line or not.
 boolean isUndecorated()
          Returns whether panel is undecorated or not.
 boolean isWebColoredBackground()
          Returns whether should paint web-styled background or not.
 java.awt.Shape provideShape()
          Returns component shape.
 void removeLanguageContainerKey()
          Removes language container key for container which implements this interface.
 WebPanel setBorderColor(java.awt.Color color)
          Sets decoration border color.
 WebPanel setBorderStroke(java.awt.Stroke stroke)
          Sets decoration border stroke.
 WebPanel setDisabledBorderColor(java.awt.Color color)
          Sets decoration disabled border color.
 void setLanguageContainerKey(java.lang.String key)
          Sets language container key for container which implements this interface.
 void setMargin(java.awt.Insets margin)
          Sets panel margin.
 WebPanel setMargin(int spacing)
          Sets panel margin.
 WebPanel setMargin(int top, int left, int bottom, int right)
          Sets panel margin.
 WebPanel setMinimumHeight(int minimumHeight)
          Sets component minimum height.
 WebPanel setMinimumWidth(int minimumWidth)
          Sets component minimum width.
 WebPanel setPaintBackground(boolean paint)
          Sets whether should paint decoration background or not.
 void setPaintBottom(boolean bottom)
          Sets whether should paint bottom side or not.
 void setPaintBottomLine(boolean bottom)
          Sets whether should paint bottom side line or not.
 WebPanel setPainter(Painter painter)
          Sets panel painter.
 WebPanel setPaintFocus(boolean paint)
          Sets whether focus should be painted or not.
 void setPaintLeft(boolean left)
          Sets whether should paint left side or not.
 void setPaintLeftLine(boolean left)
          Sets whether should paint left side line or not.
 void setPaintRight(boolean right)
          Sets whether should paint right side or not.
 void setPaintRightLine(boolean right)
          Sets whether should paint right side line or not.
 void setPaintSideLines(boolean top, boolean left, boolean bottom, boolean right)
          Sets whether should paint specific side lines or not.
 void setPaintSides(boolean top, boolean left, boolean bottom, boolean right)
          Sets whether should paint specific sides or not.
 void setPaintTop(boolean top)
          Sets whether should paint top side or not.
 void setPaintTopLine(boolean top)
          Sets whether should paint top side line or not.
 WebPanel setPreferredHeight(int preferredHeight)
          Sets component preferred height.
 WebPanel setPreferredWidth(int preferredWidth)
          Sets component preferred width.
 WebPanel setRound(int round)
          Sets decoration corners rounding.
 WebPanel setShadeTransparency(float transparency)
          Sets decoration shade transparency.
 WebPanel setShadeWidth(int shadeWidth)
          Sets decoration shade width.
 void setStyleId(java.lang.String id)
          Sets custom component style ID.
 WebPanel setUndecorated(boolean undecorated)
          Sets whether panel should be undecorated or not.
 WebPanel setWebColoredBackground(boolean webColored)
          Sets whether should paint web-styled background or not.
 void updateUI()
          Installs a Web-UI into this component.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebPanel

public WebPanel()
Constructs new panel.


WebPanel

public WebPanel(boolean decorated)
Constructs new panel which is either decorated or undecorated.

Parameters:
decorated - whether panel should be decorated or not

WebPanel

public WebPanel(boolean decorated,
                java.awt.LayoutManager layout)
Constructs new panel with the specified layout which is either decorated or undecorated.

Parameters:
decorated - whether panel should be decorated or not
layout - panel layout

WebPanel

public WebPanel(boolean decorated,
                java.awt.Component component)
Constructs new panel which is either decorated or undecorated. Also the specified component is automatically added into panel's center area.

Parameters:
decorated - whether panel should be decorated or not
component - component to add into the panel

WebPanel

public WebPanel(java.awt.Component component)
Constructs new panel with the specified component automatically added into panel's center area.

Parameters:
component - component to add into the panel

WebPanel

public WebPanel(Painter painter)
Constructs new panel with the specified painter.

Parameters:
painter - panel painter

WebPanel

public WebPanel(java.awt.LayoutManager layout,
                Painter painter)
Constructs new panel with the specified layout and painter.

Parameters:
layout - panel layout
painter - panel painter

WebPanel

public WebPanel(Painter painter,
                java.awt.Component component)
Constructs new panel with the specified painter. Also the specified component is automatically added into panel's center area.

Parameters:
painter - panel painter
component - component to add into the panel

WebPanel

public WebPanel(java.awt.LayoutManager layout,
                Painter painter,
                java.awt.Component... components)
Constructs new panel with the specified layout and painter. Also the specified components are automatically added into panel's center area.

Parameters:
layout - panel layout
painter - panel painter
components - components to add into panel

WebPanel

public WebPanel(java.awt.LayoutManager layout)
Constructs new panel with the specified layout.

Parameters:
layout - panel layout

WebPanel

public WebPanel(java.awt.LayoutManager layout,
                boolean isDoubleBuffered)
Constructs new panel with the specified layout and double-buffered mark.

Parameters:
layout - panel layout
isDoubleBuffered - whether panel should be double-buffered or not

WebPanel

public WebPanel(java.awt.LayoutManager layout,
                java.awt.Component... components)
Constructs new panel with the specified layout. Also the specified components are automatically added into panel's center area.

Parameters:
layout - panel layout
components - components to add into panel

WebPanel

public WebPanel(java.lang.String styleId)
Constructs new panel with the specified style ID.

Parameters:
styleId - style ID

WebPanel

public WebPanel(java.lang.String styleId,
                java.awt.LayoutManager layout)
Constructs new panel with the specified style ID.

Parameters:
styleId - style ID
layout - panel layout

WebPanel

public WebPanel(java.lang.String styleId,
                java.awt.Component component)
Constructs new panel with the specified style ID.

Parameters:
styleId - style ID
component - component to add into panel
Method Detail

add

public WebPanel add(java.util.List<? extends java.awt.Component> components,
                    int index)
Adds all components from the list into the panel under the specified index.

Parameters:
components - components to add into panel
index - index where components should be placed
Returns:
this panel

add

public WebPanel add(java.util.List<? extends java.awt.Component> components,
                    java.lang.String constraints)
Adds all components from the list into the panel under the specified constraints.

Parameters:
components - components to add into panel
constraints - constraints for all components
Returns:
this panel

add

public WebPanel add(java.util.List<? extends java.awt.Component> components)
Adds all components from the list into the panel.

Parameters:
components - components to add into panel
Returns:
this panel

add

public WebPanel add(int index,
                    java.awt.Component... components)
Adds all components into the panel under the specified index.

Parameters:
index - index where components should be placed
components - components to add into panel
Returns:
this panel

add

public WebPanel add(java.lang.String constraints,
                    java.awt.Component... components)
Adds all components into the panel under the specified constraints. It might be a rare case when you would require to put more than one component under the same constraint, but it is possible.

Parameters:
constraints - constraints for all components
components - components to add into panel
Returns:
this panel

add

public WebPanel add(java.awt.Component... components)
Adds all specified components into the panel. Useful for layouts like FlowLayout and some others.

Parameters:
components - components to add into panel
Returns:
this panel

getFirstComponent

public java.awt.Component getFirstComponent()
Returns first component contained in this panel.

Returns:
first component contained in this panel

getLastComponent

public java.awt.Component getLastComponent()
Returns last component contained in this panel.

Returns:
last component contained in this panel

isUndecorated

public boolean isUndecorated()
Returns whether panel is undecorated or not.

Returns:
true if panel is undecorated, false otherwise

setUndecorated

public WebPanel setUndecorated(boolean undecorated)
Sets whether panel should be undecorated or not.

Parameters:
undecorated - whether panel should be undecorated or not
Returns:
this panel

isPaintFocus

public boolean isPaintFocus()
Returns whether focus should be painted or not. Panel focus is displayed when either panel or one of its children are focused.

Returns:
true if focus should be painted, false otherwise

setPaintFocus

public WebPanel setPaintFocus(boolean paint)
Sets whether focus should be painted or not. Panel focus is displayed when either panel or one of its children are focused.

Parameters:
paint - whether focus should be painted or not
Returns:
this panel

getMargin

public java.awt.Insets getMargin()
Returns panel margin.

Returns:
panel margin

setMargin

public void setMargin(java.awt.Insets margin)
Sets panel margin.

Parameters:
margin - new panel margin

setMargin

public WebPanel setMargin(int top,
                          int left,
                          int bottom,
                          int right)
Sets panel margin.

Parameters:
top - top panel margin
left - left panel margin
bottom - bottom panel margin
right - right panel margin
Returns:
this panel

setMargin

public WebPanel setMargin(int spacing)
Sets panel margin.

Parameters:
spacing - panel margin
Returns:
this panel

isPaintTop

public boolean isPaintTop()
Returns whether should paint top side or not.

Returns:
true if should paint top side, false otherwise

setPaintTop

public void setPaintTop(boolean top)
Sets whether should paint top side or not.

Specified by:
setPaintTop in interface PartialDecoration
Parameters:
top - whether should paint top side or not

isPaintLeft

public boolean isPaintLeft()
Returns whether should paint left side or not.

Returns:
true if should paint left side, false otherwise

setPaintLeft

public void setPaintLeft(boolean left)
Sets whether should paint left side or not.

Specified by:
setPaintLeft in interface PartialDecoration
Parameters:
left - whether should paint left side or not

isPaintBottom

public boolean isPaintBottom()
Returns whether should paint bottom side or not.

Returns:
true if should paint bottom side, false otherwise

setPaintBottom

public void setPaintBottom(boolean bottom)
Sets whether should paint bottom side or not.

Specified by:
setPaintBottom in interface PartialDecoration
Parameters:
bottom - whether should paint bottom side or not

isPaintRight

public boolean isPaintRight()
Returns whether should paint right side or not.

Returns:
true if should paint right side, false otherwise

setPaintRight

public void setPaintRight(boolean right)
Sets whether should paint right side or not.

Specified by:
setPaintRight in interface PartialDecoration
Parameters:
right - whether should paint right side or not

setPaintSides

public void setPaintSides(boolean top,
                          boolean left,
                          boolean bottom,
                          boolean right)
Sets whether should paint specific sides or not.

Specified by:
setPaintSides in interface PartialDecoration
Parameters:
top - whether should paint top side or not
left - whether should paint left side or not
bottom - whether should paint bottom side or not
right - whether should paint right side or not

isPaintTopLine

public boolean isPaintTopLine()
Returns whether should paint top side line or not.

Returns:
true if should paint top side line, false otherwise

setPaintTopLine

public void setPaintTopLine(boolean top)
Sets whether should paint top side line or not.

Specified by:
setPaintTopLine in interface PartialDecoration
Parameters:
top - whether should paint top side line or not

isPaintLeftLine

public boolean isPaintLeftLine()
Returns whether should paint left side line or not.

Returns:
true if should paint left side line, false otherwise

setPaintLeftLine

public void setPaintLeftLine(boolean left)
Sets whether should paint left side line or not.

Specified by:
setPaintLeftLine in interface PartialDecoration
Parameters:
left - whether should paint left side line or not

isPaintBottomLine

public boolean isPaintBottomLine()
Returns whether should paint bottom side line or not.

Returns:
true if should paint bottom side line, false otherwise

setPaintBottomLine

public void setPaintBottomLine(boolean bottom)
Sets whether should paint bottom side line or not.

Specified by:
setPaintBottomLine in interface PartialDecoration
Parameters:
bottom - whether should paint bottom side line or not

isPaintRightLine

public boolean isPaintRightLine()
Returns whether should paint right side line or not.

Returns:
true if should paint right side line, false otherwise

setPaintRightLine

public void setPaintRightLine(boolean right)
Sets whether should paint right side line or not.

Specified by:
setPaintRightLine in interface PartialDecoration
Parameters:
right - whether should paint right side line or not

setPaintSideLines

public void setPaintSideLines(boolean top,
                              boolean left,
                              boolean bottom,
                              boolean right)
Sets whether should paint specific side lines or not.

Specified by:
setPaintSideLines in interface PartialDecoration
Parameters:
top - whether should paint top side line or not
left - whether should paint left side line or not
bottom - whether should paint bottom side line or not
right - whether should paint right side line or not

getRound

public int getRound()
Returns decoration corners rounding.

Returns:
decoration corners rounding

setRound

public WebPanel setRound(int round)
Sets decoration corners rounding.

Parameters:
round - decoration corners rounding
Returns:
this panel

getShadeWidth

public int getShadeWidth()
Returns decoration shade width.

Returns:
decoration shade width

setShadeWidth

public WebPanel setShadeWidth(int shadeWidth)
Sets decoration shade width.

Parameters:
shadeWidth - decoration shade width
Returns:
this panel

getShadeTransparency

public float getShadeTransparency()
Returns decoration shade transparency.

Returns:
decoration shade transparency

setShadeTransparency

public WebPanel setShadeTransparency(float transparency)
Sets decoration shade transparency.

Parameters:
transparency - new decoration shade transparency
Returns:
this panel

getBorderStroke

public java.awt.Stroke getBorderStroke()
Returns decoration border stroke.

Returns:
decoration border stroke

setBorderStroke

public WebPanel setBorderStroke(java.awt.Stroke stroke)
Sets decoration border stroke.

Parameters:
stroke - decoration border stroke
Returns:
this panel

getBorderColor

public java.awt.Color getBorderColor()
Returns decoration border color.

Returns:
decoration border color

setBorderColor

public WebPanel setBorderColor(java.awt.Color color)
Sets decoration border color.

Parameters:
color - decoration border color
Returns:
this panel

getDisabledBorderColor

public java.awt.Color getDisabledBorderColor()
Returns decoration disabled border color.

Returns:
decoration disabled border color

setDisabledBorderColor

public WebPanel setDisabledBorderColor(java.awt.Color color)
Sets decoration disabled border color.

Parameters:
color - decoration disabled border color
Returns:
this panel

isPaintBackground

public boolean isPaintBackground()
Returns whether should paint decoration background or not.

Returns:
true if should paint decoration background, false otherwise

setPaintBackground

public WebPanel setPaintBackground(boolean paint)
Sets whether should paint decoration background or not.

Parameters:
paint - whether should paint decoration background or not
Returns:
this panel

isWebColoredBackground

public boolean isWebColoredBackground()
Returns whether should paint web-styled background or not.

Returns:
true if should paint web-styled background, false otherwise

setWebColoredBackground

public WebPanel setWebColoredBackground(boolean webColored)
Sets whether should paint web-styled background or not.

Parameters:
webColored - whether should paint web-styled background or not
Returns:
this panel

getPainter

public Painter getPainter()
Returns panel painter.

Returns:
panel painter

setPainter

public WebPanel setPainter(Painter painter)
Sets panel painter. Pass null to remove panel painter.

Parameters:
painter - new panel painter
Returns:
this panel

getStyleId

public java.lang.String getStyleId()
Returns component style ID. Custom ID can be specified to override default component style using "setStyleId" method. If style for such custom ID is not found in skin descriptor then default style for that component is used.

Specified by:
getStyleId in interface Styleable
Returns:
component style ID

setStyleId

public void setStyleId(java.lang.String id)
Sets custom component style ID. If style for such custom ID is not found in skin descriptor default style will be used for that component. This method forces component to instantly use component style with the specified ID.

Specified by:
setStyleId in interface Styleable
Parameters:
id - custom component style ID

provideShape

public java.awt.Shape provideShape()
Returns component shape.

Specified by:
provideShape in interface ShapeProvider
Returns:
component shape

getWebUI

public WebPanelUI getWebUI()
Returns Web-UI applied to this class.

Returns:
Web-UI applied to this class

updateUI

public void updateUI()
Installs a Web-UI into this component.

Overrides:
updateUI in class javax.swing.JPanel

getPreferredWidth

public int getPreferredWidth()
Returns component preferred width.

Specified by:
getPreferredWidth in interface SizeMethods<WebPanel>
Returns:
component preferred width

setPreferredWidth

public WebPanel setPreferredWidth(int preferredWidth)
Sets component preferred width. Pass -1 to let component choose preferred width on its own.

Specified by:
setPreferredWidth in interface SizeMethods<WebPanel>
Parameters:
preferredWidth - new component preferred width
Returns:
modified component

getPreferredHeight

public int getPreferredHeight()
Returns component preferred height.

Specified by:
getPreferredHeight in interface SizeMethods<WebPanel>
Returns:
component preferred height

setPreferredHeight

public WebPanel setPreferredHeight(int preferredHeight)
Sets component preferred height. Pass -1 to let component choose preferred height on its own.

Specified by:
setPreferredHeight in interface SizeMethods<WebPanel>
Parameters:
preferredHeight - new component preferred height
Returns:
modified component

getMinimumWidth

public int getMinimumWidth()
Returns component minimum width.

Specified by:
getMinimumWidth in interface SizeMethods<WebPanel>
Returns:
component minimum width

setMinimumWidth

public WebPanel setMinimumWidth(int minimumWidth)
Sets component minimum width. Pass -1 to let component choose minimum width on its own.

Specified by:
setMinimumWidth in interface SizeMethods<WebPanel>
Parameters:
minimumWidth - new component minimum width
Returns:
modified component

getMinimumHeight

public int getMinimumHeight()
Returns component minimum height.

Specified by:
getMinimumHeight in interface SizeMethods<WebPanel>
Returns:
component minimum height

setMinimumHeight

public WebPanel setMinimumHeight(int minimumHeight)
Sets component minimum height. Pass -1 to let component choose minimum height on its own.

Specified by:
setMinimumHeight in interface SizeMethods<WebPanel>
Parameters:
minimumHeight - new component minimum height
Returns:
modified component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns component preferred size.

Specified by:
getPreferredSize in interface SizeMethods<WebPanel>
Overrides:
getPreferredSize in class javax.swing.JComponent
Returns:
component preferred size

setLanguageContainerKey

public void setLanguageContainerKey(java.lang.String key)
Sets language container key for container which implements this interface.

Specified by:
setLanguageContainerKey in interface LanguageContainerMethods
Parameters:
key - language container key

removeLanguageContainerKey

public void removeLanguageContainerKey()
Removes language container key for container which implements this interface.

Specified by:
removeLanguageContainerKey in interface LanguageContainerMethods

getLanguageContainerKey

public java.lang.String getLanguageContainerKey()
Returns language container key for container which implements this interface.

Specified by:
getLanguageContainerKey in interface LanguageContainerMethods
Returns:
language container key for container which implements this interface