pl.edu.agh.cast.zestalgorithms.core
Class LayoutEntityAdapter

java.lang.Object
  extended by pl.edu.agh.cast.zestalgorithms.core.LayoutEntityAdapter
All Implemented Interfaces:
Comparable, org.eclipse.zest.layouts.LayoutEntity, org.eclipse.zest.layouts.LayoutItem

public class LayoutEntityAdapter
extends Object
implements org.eclipse.zest.layouts.LayoutEntity

Adapts interface of ISchemaNode to a LayoutEntity.

Author:
AGH CAST Team

Field Summary
 
Fields inherited from interface org.eclipse.zest.layouts.LayoutEntity
ATTR_PREFERRED_HEIGHT, ATTR_PREFERRED_WIDTH
 
Constructor Summary
LayoutEntityAdapter(ISchemaNode node)
          Constructs new adapter for given node
 
Method Summary
 int compareTo(Object arg)
           
 Object getGraphData()
           
 double getHeightInLayout()
           
 Object getLayoutInformation()
           
 double getWidthInLayout()
           
 double getXInLayout()
           
 double getYInLayout()
           
 void populateLayoutConstraint(org.eclipse.zest.layouts.constraints.LayoutConstraint arg0)
           
 void setGraphData(Object arg0)
          Required by LayoutEntity.
 void setLayoutInformation(Object layoutInformation)
           
 void setLocationInLayout(double x, double y)
          Sets new position of the node
Warning! coordinates will be casted to int
 void setSizeInLayout(double x, double y)
          Sets new position of the node
Warning! coordinates will be casted to int
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutEntityAdapter

public LayoutEntityAdapter(ISchemaNode node)
Constructs new adapter for given node

Parameters:
node - Node which is going to be adapted to ZEST model
Method Detail

getHeightInLayout

public double getHeightInLayout()
Specified by:
getHeightInLayout in interface org.eclipse.zest.layouts.LayoutEntity

getWidthInLayout

public double getWidthInLayout()
Specified by:
getWidthInLayout in interface org.eclipse.zest.layouts.LayoutEntity

getXInLayout

public double getXInLayout()
Specified by:
getXInLayout in interface org.eclipse.zest.layouts.LayoutEntity

getYInLayout

public double getYInLayout()
Specified by:
getYInLayout in interface org.eclipse.zest.layouts.LayoutEntity

getLayoutInformation

public Object getLayoutInformation()
Specified by:
getLayoutInformation in interface org.eclipse.zest.layouts.LayoutEntity

populateLayoutConstraint

public void populateLayoutConstraint(org.eclipse.zest.layouts.constraints.LayoutConstraint arg0)
Specified by:
populateLayoutConstraint in interface org.eclipse.zest.layouts.LayoutEntity

setLayoutInformation

public void setLayoutInformation(Object layoutInformation)
Specified by:
setLayoutInformation in interface org.eclipse.zest.layouts.LayoutEntity

setLocationInLayout

public void setLocationInLayout(double x,
                                double y)
Sets new position of the node
Warning! coordinates will be casted to int

Specified by:
setLocationInLayout in interface org.eclipse.zest.layouts.LayoutEntity

setSizeInLayout

public void setSizeInLayout(double x,
                            double y)
Sets new position of the node
Warning! coordinates will be casted to int

Specified by:
setSizeInLayout in interface org.eclipse.zest.layouts.LayoutEntity

compareTo

public int compareTo(Object arg)
Specified by:
compareTo in interface Comparable

getGraphData

public Object getGraphData()
Specified by:
getGraphData in interface org.eclipse.zest.layouts.LayoutItem
Returns:
the node that is being adapted

setGraphData

public void setGraphData(Object arg0)
Required by LayoutEntity. Does nothing.

Specified by:
setGraphData in interface org.eclipse.zest.layouts.LayoutItem


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.