| java.lang.Object org.eclipse.ui.internal.layout.TrimArea
TrimArea | public class TrimArea (Code) | | Represents one Trim Area.
since: 3.2 |
Constructor Summary | |
public | TrimArea(int id, String displayName) Create the trim area with its ID. |
Method Summary | |
public void | addTrim(TrimDescriptor desc) Add the descriptor representing a piece of trim to this trim area. | public void | addTrim(TrimDescriptor desc, TrimDescriptor beforeMe) Insert this desc before the other desc. | public int | calculateTrimSize(int wHint, int hHint) Caculate a max dimension for this trim area. | public boolean | contains(TrimDescriptor desc) Does this area contain a piece of trim. | static void | filterResizable(List input, List resizable, List nonResizable, boolean width) This method separates resizable controls from non-resizable controls. | public List | getCaches() Takes the trim area and turns it into an List of
SizeCache . | public int | getControlModifiers() The bitwise SWT modifiers that this trim area suggests, like SWT.TOP
or SWT.LEFT. | public List | getDescriptors() Return the ordered list of trim descriptors for this area. | public String | getDisplayName() The NLS display name for this area. | public int | getId() The ID for this area. | static int | getSize(SizeCache toCompute, int hint, boolean width) | public int | getTrimSize() Return the trim size for this area. | public List | getTrims() Return the ordered list of trim for this area. | public boolean | isEmpty() | static boolean | isResizable(Control control, boolean horizontally) Helper function to check for resizeable controls.
Parameters: control - the control to check Parameters: horizontally - the direction of resizeability. | public boolean | isVertical() return true if this area orientation is vertical. | public void | removeTrim(TrimDescriptor desc) Remove the descriptor representing a piece of trim from this trim area. | public void | setControlModifiers(int mod) The bitwise SWT modifiers that this trim area suggests, like SWT.TOP
or SWT.LEFT. | public void | setTrimSize(int size) Set the trim size for this area. |
TrimArea | public TrimArea(int id, String displayName)(Code) | | Create the trim area with its ID.
Parameters: id - Parameters: displayName - the NLS display name |
addTrim | public void addTrim(TrimDescriptor desc)(Code) | | Add the descriptor representing a piece of trim to this trim area.
Parameters: desc - the trim descriptor |
addTrim | public void addTrim(TrimDescriptor desc, TrimDescriptor beforeMe)(Code) | | Insert this desc before the other desc. If beforeMe is not
part of this area it just defaults to an add.
Parameters: desc - the window trim Parameters: beforeMe - before this trim |
calculateTrimSize | public int calculateTrimSize(int wHint, int hHint)(Code) | | Caculate a max dimension for this trim area. It uses a different hint
depending on its orientation.
Parameters: wHint - a width hint in pixels Parameters: hHint - a height hint in pixels the size in pixels |
contains | public boolean contains(TrimDescriptor desc)(Code) | | Does this area contain a piece of trim.
Parameters: desc - the trim true if we contain the trim. |
filterResizable | static void filterResizable(List input, List resizable, List nonResizable, boolean width)(Code) | | This method separates resizable controls from non-resizable controls.
Parameters: input - the list of SizeCache to filter Parameters: resizable - will contain resizable controls from the input list Parameters: nonResizable - will contain non-resizable controls from the input list Parameters: width - if true, we're interested in horizontally-resizable controls.Else we're interested in vertically resizable controls |
getCaches | public List getCaches()(Code) | | Takes the trim area and turns it into an List of
SizeCache .
There can be more items in the return list than there are trim
descriptors in the area.
a list of SizeCache |
getControlModifiers | public int getControlModifiers()(Code) | | The bitwise SWT modifiers that this trim area suggests, like SWT.TOP
or SWT.LEFT. The control modifiers determine the orientation,
amongst other things.
the bitwise OR of the SWT constants. |
getDescriptors | public List getDescriptors()(Code) | | Return the ordered list of trim descriptors for this area.
a List containing TrimDescriptor |
getDisplayName | public String getDisplayName()(Code) | | The NLS display name for this area.
the String display name. |
getId | public int getId()(Code) | | The ID for this area.
the ID. |
getSize | static int getSize(SizeCache toCompute, int hint, boolean width)(Code) | | |
getTrimSize | public int getTrimSize()(Code) | | Return the trim size for this area.
the size in pixels |
getTrims | public List getTrims()(Code) | | Return the ordered list of trim for this area.
a List containing IWindowTrim |
isEmpty | public boolean isEmpty()(Code) | | return true of the trim area is empty
true |
isResizable | static boolean isResizable(Control control, boolean horizontally)(Code) | | Helper function to check for resizeable controls.
Parameters: control - the control to check Parameters: horizontally - the direction of resizeability. true if the control is resizeable. |
isVertical | public boolean isVertical()(Code) | | return true if this area orientation is vertical.
true |
removeTrim | public void removeTrim(TrimDescriptor desc)(Code) | | Remove the descriptor representing a piece of trim from this trim area.
Parameters: desc - the trim descriptor |
setControlModifiers | public void setControlModifiers(int mod)(Code) | | The bitwise SWT modifiers that this trim area suggests, like SWT.TOP
or SWT.LEFT.
Parameters: mod - the bitwise OR of the SWT constants. |
setTrimSize | public void setTrimSize(int size)(Code) | | Set the trim size for this area.
Parameters: size - the size in pixels. |
|
|