java component类_Swing Component类

boolean action(Event evt, Object what) - Deprecated. As of JDK version 1.1, should register this component as ActionListener on the component which fires action events.

void add(PopupMenu popup) - Adds the specified popup menu to the component.

void addComponentListener(ComponentListener l) - Adds the specified component listener to receive the component events from this component.

void addFocusListener(FocusListener l) - Adds the specified focus listener to receive focus events from this component, when this component gains input focus.

void addHierarchyBoundsListener(HierarchyBoundsListener l) - Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component, when the hierarchy to which this container belongs changes.

void addHierarchyListener(HierarchyListener l) - Adds the specified hierarchy listener to receive hierarchy changed events from this component, when the hierarchy to which this container belongs changes.

void addInputMethodListener(InputMethodListener l) - Adds the specified input method listener to receive input method events from this component.

void addKeyListener(KeyListener l) - Adds the specified key listener to receive key events from this component.

void addMouseListener(MouseListener l) - Adds the specified mouse listener to receive mouse events from this component.

void addMouseMotionListener(MouseMotionListener l) - Adds the specified mouse motion listener to receive mouse motion events from this component.

void addMouseWheelListener(MouseWheelListener l) - Adds the specified mouse wheel listener to receive mouse wheel events from this component.

void addNotify() - Makes this Component displayable by connecting it to a native screen resource.

void addPropertyChangeListener(PropertyChangeListener listener) - Adds a PropertyChangeListener to the listener list.

void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) - Adds a PropertyChangeListener to the listener list for a specific property.

void applyComponentOrientation(ComponentOrientation orientation) - Sets the ComponentOrientation property of this component and all components contained within it.

boolean areFocusTraversalKeysSet(int id) - Returns whether the set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Component.

int checkImage(Image image, ImageObserver observer) - Returns the status of the construction of a screen representation of the specified image.

int checkImage(Image image,int width,int height, ImageObserver observer) - Returns the status of the construction of a screen representation of the specified image.

boolean contains(int x,int y) - Checks whether this component “contains” the specified point, where x and y are defined to be relative to the coordinate system of this component.

boolean contains(Point p) - Checks whether this component “contains” the specified point, where the point’s x and y coordinates are defined to be relative to the coordinate system of this component.

Image createImage(ImageProducer producer) - Creates an image from the specified image producer.

Image createImage(int width,int height) - Creates an off-screen drawable image to be used for double buffering.

VolatileImage createVolatileImage(int width,int height) - Creates a volatile off-screen drawable image to be used for double buffering.

VolatileImage createVolatileImage(int width,int height, ImageCapabilities caps) - Creates a volatile off-screen drawable image, with the given capabilities.

void deliverEvent(Event e) - Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e).

void disable() - Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

protected void disableEvents(long eventsToDisable) - Disables the events defined by the specified event mask parameter from being delivered to this component.

void dispatchEvent(AWTEvent e) - Dispatches an event to this component or one of its sub components.

void doLayout() - Prompts the layout manager to lay out this component.

void enable() - Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

void enable(boolean b) - Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).

protected void enableEvents(long eventsToEnable) - Enables the events defined by the specified event mask parameter to be delivered to this component.

void enableInputMethods(boolean enable) - Enables or disables input method support for this component.

protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) - Supports reporting bound property changes for boolean properties.

void firePropertyChange(String propertyName, byte oldValue, byte newValue) - Reports a bound property change.

void firePropertyChange(String propertyName, char oldValue, char newValue) - Reports a bound property change.

void firePropertyChange(String propertyName, double oldValue, double newValue) - Reports a bound property change.

void firePropertyChange(String propertyName, float oldValue, float newValue) - Reports a bound property change.

void firePropertyChange(String propertyName, long oldValue, long newValue) - Reports a bound property change.

protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) - Supports reporting bound property changes for Object properties.

void firePropertyChange(String propertyName, short oldValue, short newValue) - Reports a bound property change.

AccessibleContext getAccessibleContext() - Gets the AccessibleContext associated with this Component.

float getAlignmentX() - Returns the alignment along the x axis.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值