org.drools.eclipse.editors.rete
Class RowList

java.lang.Object
  extended by org.drools.eclipse.editors.rete.RowList

public class RowList
extends Object

Holder for Row elements.


Constructor Summary
RowList()
          Default constructor.
 
Method Summary
 void add(int depth, BaseVertex vertex)
          Adds new vertex to specified depth
 void dump()
          Dumps all row vertices to System.err
 Row get(int row)
           
 int getColumn(BaseVertex vertex)
           
 int getDepth()
           
 int getRow(BaseVertex vertex)
          Finds specified vertex from the rows.
 int getWidth()
          Finds the longest row width.
 int getWidth(int row)
          Width of the row at specified index.
 void optimize()
          Optimizes all rows for optimal presentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowList

public RowList()
Default constructor.

Method Detail

add

public void add(int depth,
                BaseVertex vertex)
Adds new vertex to specified depth

Parameters:
depth - depth for vertex
vertex - vertex

getDepth

public int getDepth()
Returns:
number of rows in RowList

get

public Row get(int row)
Parameters:
row - index of the row to be returned (0..n-1)
Returns:
specified row

getRow

public int getRow(BaseVertex vertex)
Finds specified vertex from the rows.

Parameters:
vertex - vertex
Returns:
row number where vertex was found (0..n-1). -1 if not found.

getWidth

public int getWidth()
Finds the longest row width.

Returns:
width of the longest row

getWidth

public int getWidth(int row)
Width of the row at specified index.

Parameters:
row -
Returns:
width

getColumn

public int getColumn(BaseVertex vertex)
Parameters:
vertex - vertex to search
Returns:
column where vertex was found

dump

public void dump()
Dumps all row vertices to System.err


optimize

public void optimize()
Optimizes all rows for optimal presentation



Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.