ca.odell.glazedlists.swing
Class JEventListPanel.AbstractFormat<E>

java.lang.Object
  extended by ca.odell.glazedlists.swing.JEventListPanel.AbstractFormat<E>
All Implemented Interfaces:
JEventListPanel.Format<E>
Enclosing class:
JEventListPanel<E>

public abstract static class JEventListPanel.AbstractFormat<E>
extends Object
implements JEventListPanel.Format<E>

A default implementation of the JEventListPanel.Format interface.


Constructor Summary
protected JEventListPanel.AbstractFormat()
          Construct a bare format.
protected JEventListPanel.AbstractFormat(com.jgoodies.forms.layout.RowSpec[] rowSpecs, com.jgoodies.forms.layout.ColumnSpec[] columnSpecs, com.jgoodies.forms.layout.RowSpec gapRow, com.jgoodies.forms.layout.ColumnSpec gapColumn, com.jgoodies.forms.layout.CellConstraints[] cellConstraints)
          Construct a format using the specifications and constraints specified.
protected JEventListPanel.AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, com.jgoodies.forms.layout.CellConstraints[] cellConstraints)
          Construct a format using the specifications and constraints specified.
protected JEventListPanel.AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, String[] cellConstraints)
          Construct a format using the specifications and constraints specified.
 
Method Summary
 int getComponentsPerElement()
          Get the number of components for each row element.
 com.jgoodies.forms.layout.CellConstraints getConstraints(int component)
          Get the constraints to lay out the specified component.
 com.jgoodies.forms.layout.ColumnSpec[] getElementColumns()
          Get the ColumnSpecs required for one element in the list.
 com.jgoodies.forms.layout.RowSpec[] getElementRows()
          Get the RowSpecs required for one element in the list.
 com.jgoodies.forms.layout.ColumnSpec getGapColumn()
          Get the ColumnSpecs to separate two elements.
 com.jgoodies.forms.layout.RowSpec getGapRow()
          Get the RowSpec to separate two elements.
 void setCellConstraints(com.jgoodies.forms.layout.CellConstraints[] cellConstraints)
          Set the constraints used for the components of each element.
 void setCellConstraints(String[] cellConstraints)
          Set the constraints used for the components of each element.
 void setElementCells(String rowSpecs, String columnSpecs)
          Set the rows and columns used for a single element cell.
 void setElementColumns(com.jgoodies.forms.layout.ColumnSpec[] elementColumns)
          Set the columns used for a single element cell.
 void setElementRows(com.jgoodies.forms.layout.RowSpec[] elementRows)
          Set the rows used for a single element cell.
 void setGapColumn(com.jgoodies.forms.layout.ColumnSpec gapColumn)
          Set the width of the horizontal gap between element cells.
 void setGapRow(com.jgoodies.forms.layout.RowSpec gapRow)
          Set the height of the vertical gap between element cells.
 void setGaps(String gapRow, String gapColumn)
          Set the size of the gaps between element cells.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.odell.glazedlists.swing.JEventListPanel.Format
getComponent
 

Constructor Detail

JEventListPanel.AbstractFormat

protected JEventListPanel.AbstractFormat(com.jgoodies.forms.layout.RowSpec[] rowSpecs,
                                         com.jgoodies.forms.layout.ColumnSpec[] columnSpecs,
                                         com.jgoodies.forms.layout.RowSpec gapRow,
                                         com.jgoodies.forms.layout.ColumnSpec gapColumn,
                                         com.jgoodies.forms.layout.CellConstraints[] cellConstraints)
Construct a format using the specifications and constraints specified.


JEventListPanel.AbstractFormat

protected JEventListPanel.AbstractFormat(String rowSpecs,
                                         String columnSpecs,
                                         String gapRow,
                                         String gapColumn,
                                         com.jgoodies.forms.layout.CellConstraints[] cellConstraints)
Construct a format using the specifications and constraints specified.


JEventListPanel.AbstractFormat

protected JEventListPanel.AbstractFormat(String rowSpecs,
                                         String columnSpecs,
                                         String gapRow,
                                         String gapColumn,
                                         String[] cellConstraints)
Construct a format using the specifications and constraints specified.


JEventListPanel.AbstractFormat

protected JEventListPanel.AbstractFormat()
Construct a bare format. Extending classes must populate all specs or override the corresponding getters so that all appropriate specifications are available.

Method Detail

getElementRows

public com.jgoodies.forms.layout.RowSpec[] getElementRows()
Get the RowSpecs required for one element in the list.

Specified by:
getElementRows in interface JEventListPanel.Format<E>

setElementRows

public void setElementRows(com.jgoodies.forms.layout.RowSpec[] elementRows)
Set the rows used for a single element cell.


getElementColumns

public com.jgoodies.forms.layout.ColumnSpec[] getElementColumns()
Get the ColumnSpecs required for one element in the list.

Specified by:
getElementColumns in interface JEventListPanel.Format<E>

setElementColumns

public void setElementColumns(com.jgoodies.forms.layout.ColumnSpec[] elementColumns)
Set the columns used for a single element cell.


setElementCells

public void setElementCells(String rowSpecs,
                            String columnSpecs)
Set the rows and columns used for a single element cell.


getComponentsPerElement

public int getComponentsPerElement()
Get the number of components for each row element.

Specified by:
getComponentsPerElement in interface JEventListPanel.Format<E>

getConstraints

public com.jgoodies.forms.layout.CellConstraints getConstraints(int component)
Get the constraints to lay out the specified component.

Specified by:
getConstraints in interface JEventListPanel.Format<E>
Parameters:
component - the component to fetch constraints for.
Returns:
constraints that specify how to lay out the component. The constraints' Y value must be between (baseRow + 1) and (baseRow + getElementRows().length + 1) inclusive. The constraints' X value must be between 1 and (getElementColumns().length + 1) inclusive.

setCellConstraints

public void setCellConstraints(com.jgoodies.forms.layout.CellConstraints[] cellConstraints)
Set the constraints used for the components of each element.


setCellConstraints

public void setCellConstraints(String[] cellConstraints)
Set the constraints used for the components of each element.


getGapRow

public com.jgoodies.forms.layout.RowSpec getGapRow()
Get the RowSpec to separate two elements.

Specified by:
getGapRow in interface JEventListPanel.Format<E>
Returns:
the RowSpec for the spacer row, or null for no gap.

getGapColumn

public com.jgoodies.forms.layout.ColumnSpec getGapColumn()
Get the ColumnSpecs to separate two elements.

Specified by:
getGapColumn in interface JEventListPanel.Format<E>
Returns:
the ColumnSpec for the spacer column, or null for no gap.

setGapRow

public void setGapRow(com.jgoodies.forms.layout.RowSpec gapRow)
Set the height of the vertical gap between element cells.


setGapColumn

public void setGapColumn(com.jgoodies.forms.layout.ColumnSpec gapColumn)
Set the width of the horizontal gap between element cells.


setGaps

public void setGaps(String gapRow,
                    String gapColumn)
Set the size of the gaps between element cells.



Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2017-03-13 22:58