JComponentPack 1.5.0

com.zfqjava.swing
Interface SizeModel

All Known Implementing Classes:
AbstractSizeModel, DefaultSizeModel, LargeSizeModel

public interface SizeModel


Method Summary
 void addSizeModelListener(SizeModelListener l)
          Adds a listener to the list that is notified each time a change to the size model occurs.
 void addSizes(int from, int to, int size)
          Adds the size for the specified index area.
 void addSizes(int from, int to, int[] sizes)
          Adds the size for the specified index area.
 void addUndoableEditListener(UndoableEditListener l)
          Registers the given observer to begin receiving notifications when undoable edits are made to the model.
 int getCount()
          Returns the count for this size model.
 int getIndex(int position)
          Returns the index at the specified position.
 EventListener[] getListeners(Class listenerType)
          Returns an array of all the objects currently registered as FooListeners upon this AbstractTableModel.
 String getName()
          Returns the name for this size model.
 int getPosition(int index)
          Return the position for the specified index.
 int getSize()
          Returns the size for this size model.
 int getSize(int index)
          Returns the size for ths specified index.
 boolean getSizeIsAdjusting(int index)
          Returns the size adjusting property for the specified index.
 SizeModelListener[] getSizeModelListeners()
          Returns an array of all the size model listeners registered on this model.
 int[] getSizes(int from, int to)
          Returns the size for the specified index area.
 UndoableEditListener[] getUndoableEditListeners()
          Returns an array of all the undoable edit listeners registered on this model.
 boolean isFixedSize()
          Returns whether the size in this size model is fixed.
 boolean isVisible(int index)
          Returns the size visible property for the specified index.
 void removeSizeModelListener(SizeModelListener l)
          Removes a listener from the list that is notified each time a change to the size model occurs.
 void removeSizes(int from, int to)
          Removes the sizes for the specified index.
 void removeUndoableEditListener(UndoableEditListener l)
          Unregisters the given observer from the notification list so it will no longer receive updates.
 void setSize(int size)
          Sets the size for this size model.
 void setSize(int index, int size)
          Sets the size for the specified index.
 void setSizeIsAdjusting(int index, boolean isAdjusting)
          Sets the size adjusting property for the specified index.
 void setSizes(int from, int to, int size)
          Sets the size for the specified index area.
 void setSizes(int from, int to, int[] sizes)
          Sets the size for the specified index area.
 void setVisible(int index, boolean visible)
          Sets the size visible property for the specified index.
 

Method Detail

getName

String getName()
Returns the name for this size model.

Returns:
the name for this size model

getCount

int getCount()
Returns the count for this size model.

Returns:
the count for this size model

getIndex

int getIndex(int position)
Returns the index at the specified position.

Parameters:
position - the the specified position
Returns:
the index at the specified position

getPosition

int getPosition(int index)
Return the position for the specified index.

Parameters:
index - the specified index
Returns:
the position for the specified index

setSize

void setSize(int size)
Sets the size for this size model.

Parameters:
size - the size
See Also:
getSize()

getSize

int getSize()
Returns the size for this size model.

Returns:
the size
See Also:
setSize(int)

setSize

void setSize(int index,
             int size)
Sets the size for the specified index.

Parameters:
index - the index
size - the size
See Also:
getSize()

getSize

int getSize(int index)
Returns the size for ths specified index.

Parameters:
index - the index
Returns:
the size
See Also:
setSize(int)

setSizes

void setSizes(int from,
              int to,
              int size)
Sets the size for the specified index area.

Parameters:
from - the from index
to - the to index
size - the size

setSizes

void setSizes(int from,
              int to,
              int[] sizes)
Sets the size for the specified index area.

Parameters:
from - the from index
to - the to index
sizes - the size

getSizes

int[] getSizes(int from,
               int to)
Returns the size for the specified index area.

Returns:
the size for the specified index area

addSizes

void addSizes(int from,
              int to,
              int size)
Adds the size for the specified index area.

Parameters:
from - the from index
to - the to index
size - the size

addSizes

void addSizes(int from,
              int to,
              int[] sizes)
Adds the size for the specified index area.

Parameters:
from - the from index
to - the to index
sizes - the size

removeSizes

void removeSizes(int from,
                 int to)
Removes the sizes for the specified index.

Parameters:
from - the from index
to - the to index

setSizeIsAdjusting

void setSizeIsAdjusting(int index,
                        boolean isAdjusting)
Sets the size adjusting property for the specified index.

Parameters:
index - the specified index
isAdjusting - the adjusting property
See Also:
getSizeIsAdjusting(int)

getSizeIsAdjusting

boolean getSizeIsAdjusting(int index)
Returns the size adjusting property for the specified index.

Parameters:
index - the specified index
See Also:
setSizeIsAdjusting(int, boolean)

setVisible

void setVisible(int index,
                boolean visible)
Sets the size visible property for the specified index.

Parameters:
index - the specified index
visible - the visible property
See Also:
isVisible(int)

isVisible

boolean isVisible(int index)
Returns the size visible property for the specified index.

Parameters:
index - the specified index
See Also:
setVisible(int, boolean)

isFixedSize

boolean isFixedSize()
Returns whether the size in this size model is fixed.

Returns:
whether the size in this size model is fixed

addSizeModelListener

void addSizeModelListener(SizeModelListener l)
Adds a listener to the list that is notified each time a change to the size model occurs.

Parameters:
l - the SizeModelListener

removeSizeModelListener

void removeSizeModelListener(SizeModelListener l)
Removes a listener from the list that is notified each time a change to the size model occurs.

Parameters:
l - the SizeModelListener

getSizeModelListeners

SizeModelListener[] getSizeModelListeners()
Returns an array of all the size model listeners registered on this model.

Returns:
all of this model's SizeModelListeners or an empty array if no size model listeners are currently registered
See Also:
addSizeModelListener(com.zfqjava.swing.event.SizeModelListener), removeSizeModelListener(com.zfqjava.swing.event.SizeModelListener)

addUndoableEditListener

void addUndoableEditListener(UndoableEditListener l)
Registers the given observer to begin receiving notifications when undoable edits are made to the model.

Parameters:
l - the observer to register
See Also:
UndoableEditEvent

removeUndoableEditListener

void removeUndoableEditListener(UndoableEditListener l)
Unregisters the given observer from the notification list so it will no longer receive updates.

Parameters:
l - the observer to register
See Also:
UndoableEditEvent

getUndoableEditListeners

UndoableEditListener[] getUndoableEditListeners()
Returns an array of all the undoable edit listeners registered on this model.

Returns:
all of this model's UndoableEditListeners or an empty array if no undoable edit listeners are currently registered
See Also:
addUndoableEditListener(javax.swing.event.UndoableEditListener), removeUndoableEditListener(javax.swing.event.UndoableEditListener)

getListeners

EventListener[] getListeners(Class listenerType)
Returns an array of all the objects currently registered as FooListeners upon this AbstractTableModel. FooListeners are registered using the addFooListener method.

You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a model m for its table model listeners with the following code:

TableModelListener[] tmls = (TableModelListener[])(m.getListeners(TableModelListener.class));
If no such listeners exist, this method returns an empty array.

Parameters:
listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
Returns:
an array of all objects registered as FooListeners on this component, or an empty array if no such listeners have been added
Throws:
ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener

JComponentPack 1.5.0

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