JComponentPack 1.5.0

com.zfqjava.swing
Class WorkSheet

java.lang.Object
  extended by com.zfqjava.swing.WorkSheet

public class WorkSheet
extends Object

WorkSheet


Field Summary
protected  SwingPropertyChangeSupport changeSupport
          If any PropertyChangeListeners have been registered, the changeSupport field describes them.
 
Constructor Summary
WorkSheet(String name, TableModel model)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
protected  void firePropertyChange(String propertyName, int oldValue, int newValue)
           
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Supports reporting bound property changes.
 CellSelectionModel getCellSelectionModel()
          Returns the CellSelectionModel.
 SizeModel getColumnSizeModel()
          Returns the column size model.
 int getFreezeColumn()
          Returns the freeze column.
 int getFreezeRow()
          Returns the freeze row.
 TableModel getModel()
          Returns the model.
 String getName()
          Returns the worksheet name.
 Map getPrintProperties()
          Returns the read-only print properties.
 PropertyChangeListener[] getPropertyChangeListeners()
          Returns an array of all the PropertyChangeListeners added to this ResultSetTableModel with addPropertyChangeListener().
 SizeModel getRowSizeModel()
          Returns the row size model.
 Map getSheetProperties()
          Returns the sheet properties.
 WorkBook getWorkBook()
          Returns the current work book.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void setCellSelectionModel(CellSelectionModel cellSelectionModel)
          Sets the CellSelectionModel.
 void setColumnSizeModel(SizeModel columnSizeModel)
          Sets the column size model.
 void setFreezeCell(int row, int column)
          Sets the freeze cell.
 void setFreezeColumn(int column)
          Sets the freeze column.
 void setFreezeRow(int row)
           
 void setModel(TableModel model)
          Sets the model.
 void setName(String name)
          Sets the worksheet name.
 void setPrintProperties(Map map)
          Sets the print properties.
 void setRowSizeModel(SizeModel rowSizeModel)
          Sets the row size model.
 void setSheetProperties(Map map)
          Sets the sheet properties.
 void setWorkBook(WorkBook workBook)
          Sets the work book for this sheet.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

changeSupport

protected SwingPropertyChangeSupport changeSupport
If any PropertyChangeListeners have been registered, the changeSupport field describes them.

Constructor Detail

WorkSheet

public WorkSheet(String name,
                 TableModel model)
Method Detail

getName

public String getName()
Returns the worksheet name.

Returns:
the worksheet name

setName

public void setName(String name)
Sets the worksheet name.

Parameters:
name - the worksheet name
Since:
JDataGrid 2.0

getModel

public TableModel getModel()
Returns the model.

Returns:
the model

setModel

public void setModel(TableModel model)
Sets the model.

Parameters:
model - the model
Since:
JDataGrid 2.0

getPrintProperties

public Map getPrintProperties()
Returns the read-only print properties.

Returns:
the read-only print properties

setPrintProperties

public void setPrintProperties(Map map)
Sets the print properties.

Parameters:
map - the print properties
Since:
JDataGrid 2.0

setColumnSizeModel

public void setColumnSizeModel(SizeModel columnSizeModel)
Sets the column size model.

Parameters:
columnSizeModel - the column size model
Since:
JDataGrid 1.9
See Also:
getColumnSizeModel()

getColumnSizeModel

public SizeModel getColumnSizeModel()
Returns the column size model.

Returns:
the column size model
Since:
JDataGrid 1.9
See Also:
setColumnSizeModel(com.zfqjava.swing.SizeModel)

setRowSizeModel

public void setRowSizeModel(SizeModel rowSizeModel)
Sets the row size model.

Parameters:
rowSizeModel - the row size model
Since:
JDataGrid 1.9
See Also:
getRowSizeModel()

getRowSizeModel

public SizeModel getRowSizeModel()
Returns the row size model.

Returns:
the row size model
Since:
JDataGrid 1.9
See Also:
setRowSizeModel(com.zfqjava.swing.SizeModel)

getSheetProperties

public Map getSheetProperties()
Returns the sheet properties.

Returns:
the sheet properties
Since:
JDataGrid 2.0

setSheetProperties

public void setSheetProperties(Map map)
Sets the sheet properties.

Parameters:
map - the sheet properties
Since:
JDataGrid 2.0

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Supports reporting bound property changes. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.


firePropertyChange

protected void firePropertyChange(String propertyName,
                                  int oldValue,
                                  int newValue)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to setting a bound property, e.g. setFont, setBackground, or setForeground. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property.

Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
listener - the PropertyChangeListener to be removed

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners()
Returns an array of all the PropertyChangeListeners added to this ResultSetTableModel with addPropertyChangeListener().

Returns:
all of the PropertyChangeListeners added or an empty array if no listeners have been added

getCellSelectionModel

public CellSelectionModel getCellSelectionModel()
Returns the CellSelectionModel.

Returns:
the CellSelectionModel
Since:
JDataGrid 2.0

setCellSelectionModel

public void setCellSelectionModel(CellSelectionModel cellSelectionModel)
Sets the CellSelectionModel.

Parameters:
cellSelectionModel - the CellSelectionModel
Since:
JDataGrid 2.0

toString

public String toString()
Overrides:
toString in class Object

getWorkBook

public WorkBook getWorkBook()
Returns the current work book.

Returns:
the current work book
Since:
JDataGrid 2.0
See Also:
setWorkBook(com.zfqjava.swing.WorkBook)

setWorkBook

public void setWorkBook(WorkBook workBook)
Sets the work book for this sheet.

Parameters:
workBook - the work book
Since:
JDataGrid 2.0
See Also:
getWorkBook()

setFreezeCell

public void setFreezeCell(int row,
                          int column)
Sets the freeze cell.

Parameters:
row - the top row visible in the bottom pane
column - the left column visible in the right pane
Since:
JDataGrid 2.0
See Also:
setFreezeRow(int), getFreezeRow(), setFreezeColumn(int), getFreezeColumn()

setFreezeRow

public void setFreezeRow(int row)

getFreezeRow

public int getFreezeRow()
Returns the freeze row.

Returns:
the freeze row, the top row visible in the bottom pane
Since:
JDataGrid 2.0
See Also:
setFreezeCell(int, int), setFreezeRow(int)

setFreezeColumn

public void setFreezeColumn(int column)
Sets the freeze column.

Parameters:
column - the freeze column, the left column visible in the right pane
Since:
JDataGrid 2.0
See Also:
setFreezeCell(int, int), getFreezeColumn()

getFreezeColumn

public int getFreezeColumn()
Returns the freeze column.

Returns:
the freeze column, the left column visible in the right pane
Since:
JDataGrid 2.0
See Also:
setFreezeCell(int, int), setFreezeColumn(int)

JComponentPack 1.5.0

Send your Feedback
JComponentPack 1.5.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.