|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Allow programmatic access to the workbench window trim areas.
Note: This is highly experimental and will change between M4 and M5. For example, the current trim area IDs will be changes to Strings, amongst other things.
| Field Summary | |
|---|---|
static int |
BOTTOM
Trim area location. |
static int |
LEFT
Trim area location. |
static int |
NONTRIM
Trim area location. |
static int |
RIGHT
Trim area location. |
static int |
TOP
Trim area location. |
| Method Summary | |
|---|---|
void |
addTrim(int areaId,
IWindowTrim trim)
Adds the given control to the layout's trim. |
void |
addTrim(int areaId,
IWindowTrim trim,
IWindowTrim beforeMe)
Adds the given control to the layout's trim. |
List |
getAllTrim()
This method returns an aggregate array of all trim items known to this TrimLayout. |
int[] |
getAreaIds()
Return all of the IDs for the currently supported trim areas. |
List |
getAreaTrim(int areaId)
Return a copy of the IWindowTrim in an ordered array. |
IWindowTrim |
getTrim(String id)
Return the window trim for a given id. |
void |
removeTrim(IWindowTrim toRemove)
Removes the given window trim. |
void |
setTrimVisible(IWindowTrim trim,
boolean visible)
Update the visibility of the trim controls. |
void |
updateAreaTrim(int id,
List trim,
boolean removeExtra)
Update ID's area description with the new window trim ordering. |
| Field Detail |
public static final int TOP
public static final int BOTTOM
public static final int LEFT
public static final int RIGHT
public static final int NONTRIM
| Method Detail |
public void addTrim(int areaId,
IWindowTrim trim)
trim - new window trim to be addedareaId - the area IDgetAreaIds(),
addTrim(int, IWindowTrim, IWindowTrim)
public void addTrim(int areaId,
IWindowTrim trim,
IWindowTrim beforeMe)
For example, this method allows the caller to say "insert this new control as trim along the bottom of the layout, to the left of this existing control".
trim - new window trim to be addedareaId - the area IDbeforeMe - trim to insert before, null to insert at the
endgetAreaIds()public void removeTrim(IWindowTrim toRemove)
toRemove - a piece of trim.public IWindowTrim getTrim(String id)
id - the id
null if not found.public int[] getAreaIds()
public List getAreaTrim(int areaId)
null. This array can be used to shuffle items
around in updateAreaTrim(int, List, boolean).
areaId - the trim area id
getAreaIds()
public void updateAreaTrim(int id,
List trim,
boolean removeExtra)
id - the trim area IDtrim - the trim array must not be null.removeExtra - if true the any trim in the specified trim area
that's not contained in the List is removed from the window
trim (but not disposed()). If false then the
extra trim is shuffled to the beginning of the trim area.getAreaIds()public List getAllTrim()
public void setTrimVisible(IWindowTrim trim,
boolean visible)
trim - the trim to updatevisible - visible or not
|
Eclipse Platform Release 3.2 |
|||||||||||
| 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, 2005. All rights reserved.