|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface of a control presenting information. The information is given in the form of an input object. It can be either the content itself or a description of the content. The specification of what is required from an input object is left to the implementers of this interface.
The information control may not grab focus when made visible using
setVisible(true)
.
In order to provide backward compatibility for clients of
IInformationControl
, extension interfaces are used as a means
of evolution. The following extension interfaces exist:
IInformationControlExtension
since
version 2.0 introducing the predicate of whether the control has anything to
show or would be emptyIInformationControlExtension2
since
version 2.1 replacing the original concept of textual input by general input
objects.IInformationControlExtension3
since
version 3.0 providing access to the control's bounds and introducing
the concept of persistent size and location.
Clients can implements that interface and its extension interfaces or use the
provided default implementation DefaultInformationControl
.
IInformationControlExtension
,
IInformationControlExtension2
,
IInformationControlExtension3
Method Summary | |
void |
addDisposeListener(DisposeListener listener)
Adds the given listener to the list of dispose listeners. |
void |
addFocusListener(FocusListener listener)
Adds the given listener to the list of focus listeners. |
Point |
computeSizeHint()
Computes and returns a proposal for the size of this information control depending on the information to present. |
void |
dispose()
Disposes this information control. |
boolean |
isFocusControl()
Returns whether this information control has the focus. |
void |
removeDisposeListener(DisposeListener listener)
Removes the given listeners from the list of dispose listeners. |
void |
removeFocusListener(FocusListener listener)
Removes the given listeners from the list of focus listeners. |
void |
setBackgroundColor(Color background)
Sets the background color of this information control. |
void |
setFocus()
Sets the keyboard focus to this information control. |
void |
setForegroundColor(Color foreground)
Sets the foreground color of this information control. |
void |
setInformation(String information)
Sets the information to be presented by this information control. |
void |
setLocation(Point location)
Sets the location of this information control. |
void |
setSize(int width,
int height)
Sets the size of this information control. |
void |
setSizeConstraints(int maxWidth,
int maxHeight)
Sets the information control's size constraints. |
void |
setVisible(boolean visible)
Controls the visibility of this information control. |
Method Detail |
public void setInformation(String information)
Replaced by IInformationControlExtension2.setInput(Object)
.
information
- the information to be presentedpublic void setSizeConstraints(int maxWidth, int maxHeight)
-1
indicates no constraint. This method must be called before
computeSizeHint
is called.
Note: An information control which implements IInformationControlExtension3
may ignore this method or use it as hint for its very first appearance.
maxWidth
- the maximal width of the control to present the information, or -1
for not constraintmaxHeight
- the maximal height of the control to present the information, or -1
for not constraintpublic Point computeSizeHint()
public void setVisible(boolean visible)
visible
- true
if the control should be visiblepublic void setSize(int width, int height)
width
- the width of the controlheight
- the height of the controlpublic void setLocation(Point location)
location
- the locationpublic void dispose()
public void addDisposeListener(DisposeListener listener)
listener
- the listener to be addedpublic void removeDisposeListener(DisposeListener listener)
listener
- the listener to be removedpublic void setForegroundColor(Color foreground)
foreground
- the foreground color of this information controlpublic void setBackgroundColor(Color background)
background
- the background color of this information controlpublic boolean isFocusControl()
true
when the information control has the focus otherwise false
public void setFocus()
public void addFocusListener(FocusListener listener)
listener
- the listener to be addedpublic void removeFocusListener(FocusListener listener)
listener
- the listener to be removed
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.