Component

The class jcontrol.ui.wombat.Component is used as a basic class for all user interface components and comprises the following standard methods, that are implemented by every GUI component and every Container.

MethodDescription
getFrame()Returns the (Frame)-root of the application.
boolean isVisible()Returns the visible state of the component.
boolean isEnabled()Returns the enabled state of the component. Disabled components cannot be clicked or selected.
repaint()Causes a simple repaint of the component.
repaintAll()Causes a complete repaint of the component. I.e. even the background may be cleared and repainted.
setBackgroundColor(Color bg)Sets the background color of the component.
setForegroundColor(Color fg)Sets the foreground color of the component. In most cases this will be the font color.
setTransparentColor(Color tc)Sets the color for the transparent areas of some components. For example, there are transparent pixels beyond the round corners of buttons or comboboxes. If this color is not set the background color will be used for these pixels.
setBounds(int x, int y, int width, int height)Changes position and size of the component. This method should be used sparely as bounds are already specified by the constructor. Changing bounds of visible components can result in undesired effects caused by undeleted pixels.
setFont(Resource f)Sets the specified font as the font to be used by this Component.
setRedraw(boolean r)Setting this parameter to false will disable any drawing action for this component. After resetting the parameter to true the component will be (re-)painted as normal.
setVisible(boolean b)Sets this component visible or invisible. Setting an already painted component to invisible will cause a deletion of the component's graphical area by a filled rectangle.
Tabelle 2: Standard methods of the class jcontrol.ui.wombat.Component

A complete list of all methods of the class Component including a detailed description can be found in the JControl API documentation.