The top-level component interface which must be implemented by all
MillStone UI components. It contains the methods the MillStone framework
needs to handle the components in a user interface.
author: IT Mill Ltd. version: 3.1.1 since: 3.0
Inner Class :public class Event extends EventObject
Inner Class :public interface Listener extends EventListener
Inner Class :public class ErrorEvent extends Event
Inner Class :public interface ErrorListener extends EventListener
Notifies the component that it is connected to an application. This
method is always called before the component is first time painted
and is suitable to be extended. The getApplication() and
getWindow() functions might return null
before this method is called.
The caller of this method is
Component.setParent(Component) if the
parent is already in the application. If the parent is not in the
application, it must call the
Component.attach() for all its children
when it will be added to the application.
childRequestedRepaint
public void childRequestedRepaint(Collection alreadyNotified)(Code)
The children must call this method when they need repainting. The call must be
made event in the case the children sent the repaint request themselves.
Parameters: alreadyNotified - A collection of repaint request listeners that have beenalready notified by the child. This component should not renotify the listedlisteners again. The container given as parameter must be modifiable as the component might modify it and pass it forwards. Null parameter is interpretedas empty collection.
The caller of this method is
Component.setParent(Component) if the
parent is in the application. When the parent is detached from the application
it is its response to call
Component.detach() for all the children and
to detach itself from the terminal.
Gets the component's parent application. If the component does not
yet belong to a application null is returned.
parent application of the component or null
Gets the component's icon. A component may have a graphical icon
associated with it, this method retrieves it if it is defined.
the component's icon or null if it not defined.
Gets the locale of this component.
This component's locale. If this component does not have a locale, the locale of its parent is returned. Eventually localeof application is returned. If application does not have its own locale the locale is determined by Locale.getDefautl(). Returns null if the component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parent.
Tests if the component is enabled or not. All the variable
change events are blocked from disabled components. Also the
component should visually indicate that it is disabled (by shading
the component for example).
All hidden (isVisible() == false) components must return false.
Tests if the component is visible or not. Visibility defines if the
component is shown in the UI or not. Default is true.
true if the component is visible in the UI,false if not
Enable or disable the component. Being enabled means that the
component can be edited. This method will trigger a
org.millstone.base.terminal.Paintable.RepaintRequestEvent RepaintRequestEvent .
Parameters: enabled - boolean value specifying if the component should beenabled after the call or not
This method calls
automatically
Component.attach() if the parent is attached to a
window (or is itself a window}, and
Component.detach() if
parent is set null, but the component
was in the application.
This method is rarely called directly. Instead the
ComponentContainer.addComponent(Component) method is used
to add components to container, which call this method implicitly.
Parameters: parent - the new parent component
Sets the component's to read-only mode to the specified state. This
method will trigger a
org.millstone.base.terminal.Paintable.RepaintRequestEvent RepaintRequestEvent .
Parameters: readOnly - boolean value specifying if the component should bein read-only mode after the call or not
Sets the look-and-feel style of the component. This method will
trigger a
org.millstone.base.terminal.Paintable.RepaintRequestEvent RepaintRequestEvent .
.
Parameters: style - new style of the component
Sets the components visibility status. Visibility defines if the
component is shown in the UI or not.
Parameters: visible - Boolean value specifying if the component should bevisible after the call or not