Runtime

org.eclipse.gmf.runtime.common.ui.dialogs
Class ShowRelatedElementsPreset

java.lang.Object
  extended byorg.eclipse.gmf.runtime.common.ui.dialogs.ShowRelatedElementsPreset

public class ShowRelatedElementsPreset
extends java.lang.Object

Show Related Elements Preset


Field Summary
protected  java.lang.Object custom
          Optional custom data
protected  int expansionType
          See ExpansionType enumeration for values
protected  java.lang.String id
          Identifier
protected  java.util.List ids
          List of IDs
protected  boolean isDefault
          True if it's a default query, false if it's user defined
protected  java.lang.Object layoutType
          Optional layout type to use for this preset if functionality is available.
protected  int levels
          Levels of expansion, -1 means expand indefinitely
protected  java.lang.String name
          Name
 
Constructor Summary
ShowRelatedElementsPreset(java.lang.String newName, boolean newDefault, int newType, int newLevels)
          Constructor.
ShowRelatedElementsPreset(java.lang.String newName, boolean newDefault, int newType, int newLevels, java.util.List idList, java.lang.Object newCustom)
          Constructor.
ShowRelatedElementsPreset(java.lang.String newName, java.lang.String newID, boolean newDefault, int newType, int newLevels)
          Constructor that allows for serialization of the preset.
ShowRelatedElementsPreset(java.lang.String newName, java.lang.String newID, boolean newDefault, int newType, int newLevels, java.util.List idList, java.lang.Object newCustom)
          Constructor that allows for serialization of the preset.
 
Method Summary
 void addId(java.lang.String aID)
          Add an id to the ID List
 void addIds(java.util.List idList)
          Add a List of String ids to the ID List
 java.lang.Object getCustom()
          Return custom data for this preset, which may be null
 int getExpansionType()
          Return the expansion type ordinal.
 java.lang.String getId()
          Retrieves the serializable non-language specific id of the preset.
 java.util.List getIds()
          Return List of serializable String ids
 java.lang.Object getLayoutType()
          Return the optional layout type.
 int getLevels()
          Return the int number of levels to expand, -1 means to expand indefinitely.
 java.lang.String getName()
          Return this preset's name
 boolean isDefault()
          Return true if it's the default query, false otherwise.
 void setCustom(java.lang.Object newCustom)
          Set custom data
 void setLayoutType(java.lang.Object type)
          Set the optional layout type.
 void setName(java.lang.String newName)
          Set this preset's name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isDefault

protected boolean isDefault
True if it's a default query, false if it's user defined


name

protected java.lang.String name
Name


id

protected java.lang.String id
Identifier


ids

protected java.util.List ids
List of IDs


custom

protected java.lang.Object custom
Optional custom data


expansionType

protected int expansionType
See ExpansionType enumeration for values


levels

protected int levels
Levels of expansion, -1 means expand indefinitely


layoutType

protected java.lang.Object layoutType
Optional layout type to use for this preset if functionality is available.

Constructor Detail

ShowRelatedElementsPreset

public ShowRelatedElementsPreset(java.lang.String newName,
                                 boolean newDefault,
                                 int newType,
                                 int newLevels)
Constructor.

Parameters:
newName - name of preset
newDefault - true it's a hardcoded query, false if it's a user defined query
newType - expansion type. See ExpansionType.
newLevels - number of levels to expand, -1 for indefinite.

ShowRelatedElementsPreset

public ShowRelatedElementsPreset(java.lang.String newName,
                                 java.lang.String newID,
                                 boolean newDefault,
                                 int newType,
                                 int newLevels)
Constructor that allows for serialization of the preset.

Parameters:
newName - name of preset
newID - serializable and non-language specific identifier for the preset
newDefault - true it's a hardcoded query, false if it's a user defined query
newType - expansion type. See ExpansionType.
newLevels - number of levels to expand, -1 for indefinite.

ShowRelatedElementsPreset

public ShowRelatedElementsPreset(java.lang.String newName,
                                 boolean newDefault,
                                 int newType,
                                 int newLevels,
                                 java.util.List idList,
                                 java.lang.Object newCustom)
Constructor.

Parameters:
newName - name of preset
newDefault - true it's a hardcoded query, false if it's a user defined query
newType - expansion type. See ExpansionType.
newLevels - number of levels to expand, -1 for indefinite.
idList - list of IDs
newCustom - custom String data.

ShowRelatedElementsPreset

public ShowRelatedElementsPreset(java.lang.String newName,
                                 java.lang.String newID,
                                 boolean newDefault,
                                 int newType,
                                 int newLevels,
                                 java.util.List idList,
                                 java.lang.Object newCustom)
Constructor that allows for serialization of the preset.

Parameters:
newName - name of preset
newID - serializable and non-language specific identifier for the preset
newDefault - true it's a hardcoded query, false if it's a user defined query
newType - expansion type. See ExpansionType.
newLevels - number of levels to expand, -1 for indefinite.
idList - list of IDs
newCustom - custom String data.
Method Detail

isDefault

public boolean isDefault()
Return true if it's the default query, false otherwise.

Returns:
true if it's the default query, false otherwise.

getName

public java.lang.String getName()
Return this preset's name

Returns:
String name

setName

public void setName(java.lang.String newName)
Set this preset's name

Parameters:
newName - String name

getId

public java.lang.String getId()
Retrieves the serializable non-language specific id of the preset.

Returns:
The identifier for the preset.

getCustom

public java.lang.Object getCustom()
Return custom data for this preset, which may be null

Returns:
custom data

setCustom

public void setCustom(java.lang.Object newCustom)
Set custom data

Parameters:
newCustom - String with custom data

getIds

public java.util.List getIds()
Return List of serializable String ids

Returns:
List of serializable String ids

addId

public void addId(java.lang.String aID)
Add an id to the ID List

Parameters:
aID - String id to add to the ID List

addIds

public void addIds(java.util.List idList)
Add a List of String ids to the ID List

Parameters:
idList - List of String ids to add to the ID List

getLevels

public int getLevels()
Return the int number of levels to expand, -1 means to expand indefinitely.

Returns:
int number of levels to expand. -1 means to expand indefinitely.

getExpansionType

public int getExpansionType()
Return the expansion type ordinal. See ExpansionType for more information

Returns:
the expansion type ordinal.

getLayoutType

public java.lang.Object getLayoutType()
Return the optional layout type.

Returns:
A layout type or (null) if none set.

setLayoutType

public void setLayoutType(java.lang.Object type)
Set the optional layout type.

Parameters:
type - A layout type or (null) for unset.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.