Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

de.fraunhofer.isst.axbench.views.AXLLabelProvider Class Reference

Label provider for tree representation of an aXLang element. More...

List of all members.

Public Member Functions

 AXLLabelProvider (AbstractAXLView newView)
 The constructor for views.
 AXLLabelProvider (AXLMultiPageEditor newEditor)
 The constructor for multipage editors (such as the aXlang editor).
Image getImage (Object theElement)
 Returns the image (icon) for the given element.
String getText (Object theElement)
 Returns the label for the given element.
int getToolTipDisplayDelayTime (Object object)
 The time in milliseconds until the tool tip is displayed.
Point getToolTipShift (Object object)
 Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer.
String getToolTipText (Object element)
 Get the text displayed in the tool tip for object.
int getToolTipTimeDisplayed (Object object)
 The time in milliseconds the tool tip is shown for.
void update (ViewerCell cell)

Protected Member Functions

String getContents (IAXLangElement axlElement)
 Returns a string representation of the referenced contents of an element (includes a simple error list).
String getType (IAXLangElement axlElement)
 Returns the identifier of the type of the element:

  1. subcomponent -> component type
  2. port -> interface
  3. variable -> data type
  4. hwsubcomponent -> hwcomponent type
  5. data element -> data type else null.

Private Member Functions

void handleFont (TreeNode node)
 handles the font of a tree node (IAXLangElementNode and FeatureInSelection).
boolean isDualArchitectureElement (IAXLangElement axlElement)
 indicates whether the axlElement is of a type that can be used both in an application model and a resource model (applies to feature-to-architecture mappings, too)
String toPathNotation (Feature theFeature)
 Returns a string representation of a feature in path notation.

Private Attributes

AXLMultiPageEditor theEditor = null
 calling aXlang editor
AbstractAXLView theView = null
 calling aXLang view

Static Private Attributes

static final String ERROR = "error"
 constant for errors
static final String PATH_SEPARATOR = "."

Detailed Description

Label provider for tree representation of an aXLang element.

Formerly implemented as Adapter (AXLElementAdapter).

Author:
ekleinod
skaegebein
Version:
0.9.0
Since:
0.1.0

Constructor & Destructor Documentation

de.fraunhofer.isst.axbench.views.AXLLabelProvider.AXLLabelProvider ( AbstractAXLView  newView  ) 

The constructor for views.

Parameters:
newView calling view
de.fraunhofer.isst.axbench.views.AXLLabelProvider.AXLLabelProvider ( AXLMultiPageEditor  newEditor  ) 

The constructor for multipage editors (such as the aXlang editor).

Parameters:
newEditor calling editor

Member Function Documentation

String de.fraunhofer.isst.axbench.views.AXLLabelProvider.getContents ( IAXLangElement  axlElement  )  [protected]

Returns a string representation of the referenced contents of an element (includes a simple error list).

Special implementation for elements without identifier and children.

Parameters:
axlElement 
Returns:
string representation of the contents, or null
Image de.fraunhofer.isst.axbench.views.AXLLabelProvider.getImage ( Object  theElement  ) 

Returns the image (icon) for the given element.

Parameters:
theElement given element
Returns:
image
Return values:
null if none exists (no icons ill be displayed)

Reimplemented in de.fraunhofer.isst.axbench.editors.axlmultipage.treeeditor.EditableViewLabelProvider.

String de.fraunhofer.isst.axbench.views.AXLLabelProvider.getText ( Object  theElement  ) 

Returns the label for the given element.

Parameters:
theElement given element
Returns:
label
Return values:
null if element is no aXLang element (nothing will be shown)

Reimplemented in de.fraunhofer.isst.axbench.editors.axlmultipage.treeeditor.EditableViewLabelProvider.

int de.fraunhofer.isst.axbench.views.AXLLabelProvider.getToolTipDisplayDelayTime ( Object  object  ) 

The time in milliseconds until the tool tip is displayed.

Returns 500 milliseconds.

Parameters:
object the Object for which the tool tip is shown
Returns:
time in milliseconds until the tool tip is displayed
Point de.fraunhofer.isst.axbench.views.AXLLabelProvider.getToolTipShift ( Object  object  ) 

Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer.

Returns Point(5, 5);

Parameters:
object the element for which the tool tip is shown
Returns:
Point to shift of the tool tip
String de.fraunhofer.isst.axbench.views.AXLLabelProvider.getToolTipText ( Object  element  ) 

Get the text displayed in the tool tip for object.

If getToolTipText(Object) and getToolTipImage(Object) both return null the control is set back to standard behavior

Parameters:
element the element for which the tool tip is shown
Returns:
the tooltip text
Return values:
null if there is not text to display
int de.fraunhofer.isst.axbench.views.AXLLabelProvider.getToolTipTimeDisplayed ( Object  object  ) 

The time in milliseconds the tool tip is shown for.

Returns 25000 milliseconds, i.e. 25 seconds

Parameters:
object the Object for which the tool tip is shown
Returns:
time in milliseconds the tool tip is shown for
String de.fraunhofer.isst.axbench.views.AXLLabelProvider.getType ( IAXLangElement  axlElement  )  [protected]

Returns the identifier of the type of the element:

  1. subcomponent -> component type
  2. port -> interface
  3. variable -> data type
  4. hwsubcomponent -> hwcomponent type
  5. data element -> data type else null.

Parameters:
axlElement the typed element
Returns:
the id of the type of the element, or null
void de.fraunhofer.isst.axbench.views.AXLLabelProvider.handleFont ( TreeNode  node  )  [private]

handles the font of a tree node (IAXLangElementNode and FeatureInSelection).

Parameters:
node tree node
boolean de.fraunhofer.isst.axbench.views.AXLLabelProvider.isDualArchitectureElement ( IAXLangElement  axlElement  )  [private]

indicates whether the axlElement is of a type that can be used both in an application model and a resource model (applies to feature-to-architecture mappings, too)

Parameters:
axlElement the element that is checked
Returns:
true if the type of the element can be used both in an application model and a resource model
String de.fraunhofer.isst.axbench.views.AXLLabelProvider.toPathNotation ( Feature  theFeature  )  [private]

Returns a string representation of a feature in path notation.

Parameters:
theFeature feature
Returns:
path notation of feature
void de.fraunhofer.isst.axbench.views.AXLLabelProvider.update ( ViewerCell  cell  ) 

Update the label for cell.

Parameters:
cell ViewerCell

Member Data Documentation

final String de.fraunhofer.isst.axbench.views.AXLLabelProvider.ERROR = "error" [static, private]

constant for errors

calling aXlang editor

calling aXLang view