lt.monarch.chart.view
Class ViewGridIndexed

java.lang.Object
  extended by lt.monarch.chart.AbstractView<E>
      extended by lt.monarch.chart.view.CompositeView<ChartPaintTags>
          extended by lt.monarch.chart.view.ViewGrid
              extended by lt.monarch.chart.view.ViewGridIndexed
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, StyleEditorEntity, View, ViewListener

public class ViewGridIndexed
extends ViewGrid

Composite view that layouts several sub-views in a grid. Cell of grid can be specified when adding or removing the view.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.chart.view.ViewGrid
columns, columnWeight, hGap, rows, rowWeight, totalColumnWeight, totalRowWeight, vGap
 
Fields inherited from class lt.monarch.chart.view.CompositeView
views
 
Fields inherited from class lt.monarch.chart.AbstractView
layoutInvalid, paintStyle, style
 
Constructor Summary
Constructor and Description
ViewGridIndexed()
           
ViewGridIndexed(int columns, int rows)
           
 
Method Summary
Modifier and Type Method and Description
 void addView(View view)
          Adds a new view into this container.
 void addView(View view, int column, int row)
           
protected  void layout(AbstractGraphics g)
          Prepares the view by arranging all internal views and calculates required constants.
 void removeView(int column, int row)
           
 void removeView(View view)
          Removes the view from this container.
 void setGridSize(int rows, int columns)
          Sets new size for this grid.
 
Methods inherited from class lt.monarch.chart.view.ViewGrid
checkBounds, checkColumn, checkRow, getHgap, getPreferredSize, getVgap, getView, getViewIndex, increaseSize, setColumnWeight, setHgap, setRowWeight, setVgap, viewInvalidated
 
Methods inherited from class lt.monarch.chart.view.CompositeView
dispose, getContainingObjects, getGraphicsType, getViewCount, getViews, paint, setContainer, setView, validate, viewActivated, viewDeactivated
 
Methods inherited from class lt.monarch.chart.AbstractView
activate, addViewListener, clone, container, deactivate, finalize, getAlignmentX, getAlignmentY, getBounds, getChartObjectBounds, getContainer, getHeight, getMaximumSize, getMinimumSize, getPaintMode, getPaintStyle, getParent, getSize, getSize, getStyle, getStyle, getWidth, getX, getY, invalidate, isLayoutValid, removeViewListener, render, repaint, repaint, setAlignmentX, setAlignmentY, setBounds, setBounds, setLocation, setMaximumSize, setMinimumSize, setPaintMode, setPreferredSize, setSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewGridIndexed

public ViewGridIndexed()

ViewGridIndexed

public ViewGridIndexed(int columns,
                       int rows)
Method Detail

setGridSize

public void setGridSize(int rows,
                        int columns)
Description copied from class: ViewGrid
Sets new size for this grid.

Overrides:
setGridSize in class ViewGrid
Parameters:
rows - new rows count of grid
columns - new columns count of grid

addView

public void addView(View view)
Description copied from class: CompositeView
Adds a new view into this container.

Overrides:
addView in class ViewGrid
Parameters:
view - view to be added

removeView

public void removeView(View view)
Description copied from class: CompositeView
Removes the view from this container.

Overrides:
removeView in class CompositeView<ChartPaintTags>
Parameters:
view - view to be added

addView

public void addView(View view,
                    int column,
                    int row)

removeView

public void removeView(int column,
                       int row)

layout

protected void layout(AbstractGraphics g)
Description copied from class: AbstractView
Prepares the view by arranging all internal views and calculates required constants.

Overrides:
layout in class ViewGrid
Parameters:
g - graphics context