PTP
Release 5.0

org.eclipse.ptp.ui.model
Class Element

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.ptp.ui.model.Element
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<IElement>, org.eclipse.core.runtime.IAdaptable, IElement
Direct Known Subclasses:
ElementSet

public class Element
extends org.eclipse.core.runtime.PlatformObject
implements IElement


Field Summary
protected  java.lang.String id
           
protected  java.lang.String name
           
protected  IElement parent
           
protected  org.eclipse.ptp.core.elements.IPElement pElement
           
protected  boolean registered
           
protected  boolean selected
           
 
Constructor Summary
Element(IElement parent, java.lang.String id, java.lang.String name, org.eclipse.ptp.core.elements.IPElement pElement)
          Constructor
 
Method Summary
 IElement cloneElement()
          Clone a new element
 int compareTo(IElement e)
           
 java.lang.String getID()
          Get element ID
 java.lang.String getName()
          Get element name
 IElement getParent()
          Get parent
 org.eclipse.ptp.core.elements.IPElement getPElement()
          Get the core model element associated with this element.
 boolean isRegistered()
          Test if element is registered
 boolean isSelected()
          Test if element is selected
 void setRegistered(boolean registered)
          Set element to register or not
 void setSelected(boolean selected)
          Set element state to selected
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

id

protected java.lang.String id

name

protected java.lang.String name

registered

protected boolean registered

selected

protected boolean selected

parent

protected IElement parent

pElement

protected org.eclipse.ptp.core.elements.IPElement pElement
Constructor Detail

Element

public Element(IElement parent,
               java.lang.String id,
               java.lang.String name,
               org.eclipse.ptp.core.elements.IPElement pElement)
Constructor

Parameters:
parent - Parent element
id - element ID
name - element name
Method Detail

cloneElement

public IElement cloneElement()
Description copied from interface: IElement
Clone a new element

Specified by:
cloneElement in interface IElement
Returns:
cloned element

compareTo

public int compareTo(IElement e)
Specified by:
compareTo in interface java.lang.Comparable<IElement>

getID

public java.lang.String getID()
Description copied from interface: IElement
Get element ID

Specified by:
getID in interface IElement
Returns:
element ID in string format

getName

public java.lang.String getName()
Description copied from interface: IElement
Get element name

Specified by:
getName in interface IElement
Returns:
name of element

getParent

public IElement getParent()
Description copied from interface: IElement
Get parent

Specified by:
getParent in interface IElement
Returns:
element

getPElement

public org.eclipse.ptp.core.elements.IPElement getPElement()
Description copied from interface: IElement
Get the core model element associated with this element.

Specified by:
getPElement in interface IElement
Returns:
IPElement

isRegistered

public boolean isRegistered()
Description copied from interface: IElement
Test if element is registered

Specified by:
isRegistered in interface IElement
Returns:
true if element is registered

isSelected

public boolean isSelected()
Description copied from interface: IElement
Test if element is selected

Specified by:
isSelected in interface IElement
Returns:
true if element is selected

setRegistered

public void setRegistered(boolean registered)
Description copied from interface: IElement
Set element to register or not

Specified by:
setRegistered in interface IElement
Parameters:
registered - is register

setSelected

public void setSelected(boolean selected)
Description copied from interface: IElement
Set element state to selected

Specified by:
setSelected in interface IElement

PTP
Release 5.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.