public class UIButton extends javax.swing.JButton implements UIObserver, UITextComponent
限定符和类型 | 字段和说明 |
---|---|
protected boolean |
isBorderPaintedOnlyWhenPressed |
static int |
NORMAL_BORDER |
static int |
OTHER_BORDER |
protected UIObserverListener |
uiObserverListener |
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
构造器和说明 |
---|
UIButton() |
UIButton(javax.swing.Action action) |
UIButton(javax.swing.Icon icon) |
UIButton(javax.swing.Icon normal,
javax.swing.Icon rollOver,
javax.swing.Icon pressed) |
UIButton(java.lang.String string) |
UIButton(java.lang.String text,
javax.swing.Icon icon) |
限定符和类型 | 方法和说明 |
---|---|
CellBorderStyle |
getBorderStyle() |
int |
getBorderType() |
java.awt.Insets |
getInsets() |
java.awt.Dimension |
getPreferredSize() |
int |
getRectDirection() |
javax.swing.plaf.ButtonUI |
getUI() |
protected void |
initListener() |
boolean |
isDoneAuthorityEdited(java.lang.String role)
是否进行过权限编辑
|
boolean |
isExtraPainted()
是否额外画
|
boolean |
isNormalPainted()
是否正常画
|
boolean |
isPressedPainted()
是否按压画
|
boolean |
isRoundBorder()
是否圆边框
|
static void |
main(java.lang.String... args)
主函数
|
protected void |
paintBorder(java.awt.Graphics g) |
void |
paintComponent(java.awt.Graphics g) |
protected void |
paintOtherBorder(java.awt.Graphics g) |
void |
registerChangeListener(UIObserverListener listener)
给组件登记一个观察者监听事件
|
void |
set4ChartLargeToolButton() |
void |
set4LargeToolbarButton() |
void |
set4ToolbarButton() |
void |
setBorderPaintedOnlyWhenPressed(boolean value) |
void |
setBorderStyle(CellBorderStyle border) |
void |
setBorderType(int borderType) |
void |
setExtraPainted(boolean extra) |
void |
setNormalPainted(boolean isNormalPressed) |
void |
setOtherBorder(java.awt.Stroke s,
java.awt.Color c) |
void |
setPressedPainted(boolean isPressedPainted) |
void |
setRoundBorder(boolean isRoundBorder) |
void |
setRoundBorder(boolean isRound,
int rectDirection) |
boolean |
shouldResponseChangeListener()
组件是否需要响应添加的观察者事件
|
void |
updateUI()
更新界面
|
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
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, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, 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
getText, setText
public static final int OTHER_BORDER
public static final int NORMAL_BORDER
protected boolean isBorderPaintedOnlyWhenPressed
protected UIObserverListener uiObserverListener
public UIButton()
public UIButton(java.lang.String string)
public UIButton(javax.swing.Icon icon)
public UIButton(javax.swing.Action action)
public UIButton(java.lang.String text, javax.swing.Icon icon)
public UIButton(javax.swing.Icon normal, javax.swing.Icon rollOver, javax.swing.Icon pressed)
public boolean isDoneAuthorityEdited(java.lang.String role)
role
- 角色protected void initListener()
public void setBorderType(int borderType)
public void setBorderStyle(CellBorderStyle border)
public void set4ToolbarButton()
public void set4LargeToolbarButton()
public void set4ChartLargeToolButton()
public javax.swing.plaf.ButtonUI getUI()
getUI
在类中 javax.swing.AbstractButton
public void updateUI()
updateUI
在类中 javax.swing.JButton
public CellBorderStyle getBorderStyle()
public java.awt.Insets getInsets()
getInsets
在类中 javax.swing.JComponent
public java.awt.Dimension getPreferredSize()
getPreferredSize
在类中 javax.swing.JComponent
public int getBorderType()
public void setOtherBorder(java.awt.Stroke s, java.awt.Color c)
protected void paintBorder(java.awt.Graphics g)
paintBorder
在类中 javax.swing.AbstractButton
public void paintComponent(java.awt.Graphics g)
paintComponent
在类中 javax.swing.JComponent
protected void paintOtherBorder(java.awt.Graphics g)
public void setExtraPainted(boolean extra)
public boolean isExtraPainted()
public int getRectDirection()
public boolean isRoundBorder()
public void setRoundBorder(boolean isRoundBorder)
isRoundBorder
- public void setRoundBorder(boolean isRound, int rectDirection)
isRound
- rectDirection
- public boolean isPressedPainted()
public void setPressedPainted(boolean isPressedPainted)
isPressedPainted
- public boolean isNormalPainted()
public void setNormalPainted(boolean isNormalPressed)
isNormalPressed
- public void setBorderPaintedOnlyWhenPressed(boolean value)
value
- public static void main(java.lang.String... args)
args
- 入口参数public void registerChangeListener(UIObserverListener listener)
registerChangeListener
在接口中 UIObserver
listener
- 观察者监听事件public boolean shouldResponseChangeListener()
shouldResponseChangeListener
在接口中 UIObserver