Eclipse Platform
Release 3.2

org.eclipse.ui
Interface ITrimManager


Deprecated. This Interface -will- be removed in M6 and replaced with the use of the org.eclipse.ui.menus extension point.

public interface ITrimManager

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.

Since:
3.2

Field Summary
static int BOTTOM
          Deprecated. Trim area location.
static int LEFT
          Deprecated. Trim area location.
static int NONTRIM
          Deprecated. Trim area location.
static int RIGHT
          Deprecated. Trim area location.
static int TOP
          Deprecated. Trim area location.
 
Method Summary
 void addTrim(int areaId, IWindowTrim trim)
          Deprecated. Adds the given control to the layout's trim.
 void addTrim(int areaId, IWindowTrim trim, IWindowTrim beforeMe)
          Deprecated. Adds the given control to the layout's trim.
 List getAllTrim()
          Deprecated. This method returns an aggregate array of all trim items known to this TrimLayout.
 int[] getAreaIds()
          Deprecated. Return all of the IDs for the currently supported trim areas.
 List getAreaTrim(int areaId)
          Deprecated. Return a copy of the IWindowTrim in an ordered array.
 IWindowTrim getTrim(String id)
          Deprecated. Return the window trim for a given id.
 void removeTrim(IWindowTrim toRemove)
          Deprecated. Removes the given window trim.
 void setTrimVisible(IWindowTrim trim, boolean visible)
          Deprecated. Update the visibility of the trim controls.
 void updateAreaTrim(int id, List trim, boolean removeExtra)
          Deprecated. Update ID's area description with the new window trim ordering.
 

Field Detail

TOP

public static final int TOP
Deprecated. 
Trim area location.

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
Deprecated. 
Trim area location.

See Also:
Constant Field Values

LEFT

public static final int LEFT
Deprecated. 
Trim area location.

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Deprecated. 
Trim area location.

See Also:
Constant Field Values

NONTRIM

public static final int NONTRIM
Deprecated. 
Trim area location.

See Also:
Constant Field Values
Method Detail

addTrim

public void addTrim(int areaId,
                    IWindowTrim trim)
Deprecated. 
Adds the given control to the layout's trim. The same as calling addTrim(areaId, trim, null);

Parameters:
trim - new window trim to be added
areaId - the area ID
See Also:
getAreaIds(), addTrim(int, IWindowTrim, IWindowTrim)

addTrim

public void addTrim(int areaId,
                    IWindowTrim trim,
                    IWindowTrim beforeMe)
Deprecated. 
Adds the given control to the layout's trim. Note that this must be called for every trim control. If the given widget is already a trim widget, it will be moved to the new position. Specifying a position allows a new widget to be inserted between existing trim widgets.

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".

Parameters:
trim - new window trim to be added
areaId - the area ID
beforeMe - trim to insert before, null to insert at the end
See Also:
getAreaIds()

removeTrim

public void removeTrim(IWindowTrim toRemove)
Deprecated. 
Removes the given window trim. Note that this has no effect if window trim is not our window trim.

Parameters:
toRemove - a piece of trim.

getTrim

public IWindowTrim getTrim(String id)
Deprecated. 
Return the window trim for a given id.

Parameters:
id - the id
Returns:
the window trim, or null if not found.

getAreaIds

public int[] getAreaIds()
Deprecated. 
Return all of the IDs for the currently supported trim areas. This is experimental and will be changing.

Returns:
the list of IDs that can be used with area descriptions. We currently support SWT.TOP, SWT.BOTTOM, SWT.LEFT, and SWT.RIGHT.
Since:
3.2

getAreaTrim

public List getAreaTrim(int areaId)
Deprecated. 
Return a copy of the IWindowTrim in an ordered array. This will not return null. This array can be used to shuffle items around in updateAreaTrim(int, List, boolean).

Parameters:
areaId - the trim area id
Returns:
the IWindowTrim array
Since:
3.2
See Also:
getAreaIds()

updateAreaTrim

public void updateAreaTrim(int id,
                           List trim,
                           boolean removeExtra)
Deprecated. 
Update ID's area description with the new window trim ordering. This applies the IWindowTrim contains in the array to the trim area named "ID".

Parameters:
id - the trim area ID
trim - 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.
Since:
3.2
See Also:
getAreaIds()

getAllTrim

public List getAllTrim()
Deprecated. 
This method returns an aggregate array of all trim items known to this TrimLayout.

Returns:
The List of all IWindowTrim elements
Since:
3.2

setTrimVisible

public void setTrimVisible(IWindowTrim trim,
                           boolean visible)
Deprecated. 
Update the visibility of the trim controls. It updates any docking handles as well. It has no effect on visiblity if the window trim doesn't belong to this TrimLayout.

Parameters:
trim - the trim to update
visible - visible or not
Since:
3.2

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.