public class JStyledPanel extends JPanel implements Styleable
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
JStyledPanel()
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
Color |
getBackground()
Gets the background color of this component.
|
Color |
getDefaultBackground() |
Font |
getDefaultFont() |
Color |
getDefaultForeground() |
Font |
getFont()
Gets the font of this component.
|
Color |
getForeground()
Gets the foreground color of this component.
|
Style |
getNoneStyle()
Gets the none style.
|
Style |
getParentStyle()
Gets the parent style.
|
Style |
getStyle()
Gets the style.
|
boolean |
isDefaultOpaque() |
boolean |
isOpaque()
Returns true if this component is completely opaque.
|
void |
setBackground(Color bg)
Sets the background color of this component.
|
void |
setDefaultBackground(Color bg) |
void |
setDefaultFont(Font font) |
void |
setDefaultForeground(Color fg) |
void |
setDefaultOpaque(boolean isOpaque) |
void |
setFont(Font font)
Sets the font for this component.
|
void |
setForeground(Color fg)
Sets the foreground color of this component.
|
void |
setOpaque(boolean isOpaque)
If true the component paints every pixel within its bounds.
|
void |
setStyle(Style style)
Sets the style.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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, transferFocusDownCycle, validate, validateTree
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, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, 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, 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, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addHierarchyListener, getParent, removeHierarchyListener
public Style getStyle()
public void setStyle(Style style)
public Style getNoneStyle()
getNoneStyle
in interface Styleable
public Style getParentStyle()
getParentStyle
in interface Styleable
public Color getBackground()
getBackground
in class Component
setBackground(java.awt.Color)
public void setBackground(Color bg)
setBackground
in class JComponent
bg
- the desired background Color
Component.getBackground()
public void setDefaultBackground(Color bg)
setDefaultBackground
in interface Styleable
public Color getForeground()
getForeground
in class Component
setForeground(java.awt.Color)
public void setForeground(Color fg)
setForeground
in class JComponent
fg
- the desired foreground Color
Component.getForeground()
public void setDefaultForeground(Color fg)
setDefaultForeground
in interface Styleable
public Font getFont()
getFont
in interface MenuContainer
getFont
in class Component
setFont(java.awt.Font)
public void setFont(Font font)
setFont
in class JComponent
font
- the desired Font
for this componentComponent.getFont()
public void setDefaultFont(Font font)
setDefaultFont
in interface Styleable
public boolean isOpaque()
An opaque component paints every pixel within its rectangular bounds. A non-opaque component paints only a subset of its pixels or none at all, allowing the pixels underneath it to "show through". Therefore, a component that does not fully paint its pixels provides a degree of transparency.
Subclasses that guarantee to always completely paint their contents should override this method and return true.
isOpaque
in class JComponent
setOpaque(boolean)
public void setOpaque(boolean isOpaque)
The default value of this property is false for
JComponent
. However, the default value for this property on most standard
JComponent
subclasses (such as
JButton
and
JTree
) is look-and-feel dependent.
setOpaque
in class JComponent
isOpaque
- true if this component should be opaqueisOpaque()
public void setDefaultOpaque(boolean isOpaque)
setDefaultOpaque
in interface Styleable
public Color getDefaultBackground()
getDefaultBackground
in interface Styleable
public Font getDefaultFont()
getDefaultFont
in interface Styleable
public Color getDefaultForeground()
getDefaultForeground
in interface Styleable
public boolean isDefaultOpaque()
isDefaultOpaque
in interface Styleable
Copyright © 2002–2016 SoftSmithy. All rights reserved.