public class JCustomizer extends AbstractCustomizer
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 |
---|
JCustomizer()
Creates a new instance of this class.
|
JCustomizer(JComponent component)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener l)
Adds an ActionListener.
|
void |
addCustomizerListener(CustomizerListener listener)
Adds a CustomizerListener.
|
void |
applyBorder(Border border)
Applys a border to this customizer.
|
void |
fireActionEvent(ActionEvent ev)
Fires an ActionEvent.
|
void |
fireCustomizerResetBoundsRel(CustomizerEvent e)
Fires a CustomizerEvent to notify the CustomizerListeners that the bounds
of this customizer have been relatively changed.
|
void |
fireCustomizerReshapeRel(CustomizerEvent e)
Fires a CustomizerEvent to notify the CustomizerListeners this customizer
have been relatively reshaped.
|
JComponent |
getComponent()
Gets the wrapped component.
|
JPanel |
getGlassPane()
Gets the glass pane over the wrapped component.
|
Color |
getNormalBorderColor()
Gets the color of the border of the normal state.
|
JCustomizerPane |
getParentCustomizerPane()
Gets the parent JCustomizerPane.
|
Color |
getSelectedBorderColor()
Gets the color of the border of the selected state.
|
StateManager |
getStateManager()
Gets the state manager.
|
String |
getToolTipText()
Returns the tooltip string that has been set with
setToolTipText . |
boolean |
isUsingDefaultNormalBorderColor()
Tells if this customizer is using the default color of the border of the normal
state.
|
boolean |
isUsingDefaultSelectedBorderColor()
Tells if this customizer is using the default color of the border of the selected
state.
|
void |
removeActionListener(ActionListener l)
Removes an ActionListener.
|
void |
removeCustomizerListener(CustomizerListener listener)
Removes a CustomizerListener.
|
void |
reshapeRel(int dx,
int dy,
int dwidth,
int dheight)
Relatively reshapes this customizer.
|
protected void |
reshapeRelOnly(int dx,
int dy,
int dwidth,
int dheight)
Relatively reshapes this customizer without firing an event.
|
void |
setBoundsRel(int dx,
int dy,
int dwidth,
int dheight)
Relatively changes the bounds of this customizer.
|
protected void |
setBoundsRelOnly(int dx,
int dy,
int dwidth,
int dheight)
Relatively changes the bounds of this customizer without firing an event.
|
void |
setComponent(JComponent component)
Sets the wrapped component.
|
void |
setDefaultBackground(Color bg) |
void |
setDefaultFont(Font font) |
void |
setDefaultForeground(Color fg) |
void |
setDefaultOpaque(boolean isOpaque) |
void |
setHeight(int height)
Sets the height.
|
protected void |
setStateManager(StateManager manager)
Sets the state manager.
|
void |
setToolTipText(String text)
Registers the text to display in a tool tip.
|
void |
setUsingDefaultNormalBorderColor(boolean usingDefaultNormalBorderColor)
Specifies if this customizer should use the default or a custom color of
the border of the normal state.
|
void |
setUsingDefaultSelectedBorderColor(boolean usingDefaultSelectedBorderColor)
Specifies if this customizer should use the default or a custom color of
the border of the selected state.
|
void |
setWidth(int width)
Sets the width.
|
void |
setX(int x)
Sets the x coordinate.
|
void |
setY(int y)
Sets the y coordinate.
|
getCommonCustomizableProperties, getCustomizableProperties, setCustomizableProperties
getBackground, getDefaultBackground, getDefaultFont, getDefaultForeground, getFont, getForeground, getNoneStyle, getParentStyle, getStyle, isDefaultOpaque, isOpaque, setBackground, setFont, setForeground, setOpaque, setStyle
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, 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, 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 JCustomizer()
public JCustomizer(JComponent component)
component
- the wrapped componentpublic JComponent getComponent()
public void setComponent(JComponent component)
component
- the wrapped componentpublic StateManager getStateManager()
protected void setStateManager(StateManager manager)
manager
- the state managerpublic void reshapeRel(int dx, int dy, int dwidth, int dheight)
dx
- delta xdy
- delta ydwidth
- delta widthdheight
- delta heightprotected void reshapeRelOnly(int dx, int dy, int dwidth, int dheight)
dx
- delta xdy
- delta ydwidth
- delta widthdheight
- delta heightpublic void setBoundsRel(int dx, int dy, int dwidth, int dheight)
dx
- delta xdy
- delta ydwidth
- delta widthdheight
- delta heightprotected void setBoundsRelOnly(int dx, int dy, int dwidth, int dheight)
dx
- delta xdy
- delta ydwidth
- delta widthdheight
- delta heightpublic void addCustomizerListener(CustomizerListener listener)
listener
- a CustomizerListenerpublic void removeCustomizerListener(CustomizerListener listener)
listener
- a CustomizerListenerpublic void fireCustomizerResetBoundsRel(CustomizerEvent e)
e
- the CustomizerEventpublic void fireCustomizerReshapeRel(CustomizerEvent e)
e
- the CustomizerEventpublic JPanel getGlassPane()
public void setToolTipText(String text)
See How to Use Tool Tips in The Java Tutorial for further documentation.
setToolTipText
in class JComponent
text
- the string to display; if the text is null
,
the tool tip is turned off for this componentJComponent.TOOL_TIP_TEXT_KEY
public void applyBorder(Border border)
border
- a borderpublic void setX(int x)
x
- the x coordinatepublic void setY(int y)
y
- the y coordinatepublic void setWidth(int width)
width
- the widthpublic void setHeight(int height)
height
- the heightpublic String getToolTipText()
setToolTipText
.getToolTipText
in class JComponent
JComponent.TOOL_TIP_TEXT_KEY
public void setDefaultBackground(Color bg)
setDefaultBackground
in interface Styleable
setDefaultBackground
in class JStyledPanel
public void setDefaultForeground(Color fg)
setDefaultForeground
in interface Styleable
setDefaultForeground
in class JStyledPanel
public void setDefaultFont(Font font)
setDefaultFont
in interface Styleable
setDefaultFont
in class JStyledPanel
public void setDefaultOpaque(boolean isOpaque)
setDefaultOpaque
in interface Styleable
setDefaultOpaque
in class JStyledPanel
public JCustomizerPane getParentCustomizerPane()
public void addActionListener(ActionListener l)
l
- an ActionListenerpublic void removeActionListener(ActionListener l)
l
- an ActionListenerpublic void fireActionEvent(ActionEvent ev)
ev
- an ActionEventpublic Color getNormalBorderColor()
public Color getSelectedBorderColor()
public boolean isUsingDefaultNormalBorderColor()
public void setUsingDefaultNormalBorderColor(boolean usingDefaultNormalBorderColor)
usingDefaultNormalBorderColor
- true if the default color should be used, else falsepublic boolean isUsingDefaultSelectedBorderColor()
public void setUsingDefaultSelectedBorderColor(boolean usingDefaultSelectedBorderColor)
usingDefaultSelectedBorderColor
- true if the default color should be used, else falseCopyright © 2002–2017 SoftSmithy. All rights reserved.