|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.eliad.model.AbstractGenericModel | +--com.eliad.model.AbstractRulerModel | +--com.eliad.model.defaults.BasicRulerModel | +--com.eliad.model.defaults.DefaultRulerModel
A full implementation of the RulerModel
interface. It implements
BasicRulerModel.setPreferredSize(int, int)
, BasicRulerModel.setMinSize(int, int)
BasicRulerModel.setMaxSize(int, int)
.
RulerModel
,
RulerConstants
,
Intervals
, Serialized FormFields inherited from class com.eliad.model.AbstractGenericModel |
listeners_ |
Constructor Summary | |
DefaultRulerModel(Intervals intervals,
int orientation)
A constructor based on an Intervals instance,
that will provide implementation for the most important methods of the
AbstractRulerModel API. |
|
DefaultRulerModel(int numEntries,
int size,
int orientation)
A constructor that uses a default Intervals implementation. |
Method Summary | |
java.lang.Object |
clone()
A specific implementation of clone . |
protected void |
doInsertEntries(int start,
int length,
int value,
boolean visible)
|
protected void |
doRemoveEntries(int start,
int length)
|
protected int |
doSetMaxSize(int index,
int size)
Sets the maximum size of a specific entry. |
protected int |
doSetMinSize(int index,
int size)
Sets the minimum size of a specific entry. |
protected int |
doSetPreferredSize(int index,
int size)
Sets the preferred size of a specific entry. |
int |
getMaxSize(int index)
Returns the maximum size of a specific entry. |
int |
getMinSize(int index)
Returns the minimum size of a specific entry. |
int |
getPreferredSize(int i)
Returns the preferred size of a specific entry. |
int |
getTotalMaxSize()
Returns the total maximum size of the items in the most optimized way |
int |
getTotalMinSize()
Returns the total minimum size of the items in the most optimized way |
int |
getTotalPreferredSize()
Returns the total preferred size of the items in the most optimized way |
void |
setFixedSize(int size)
|
void |
setUniformMaxSize(int maxSize)
Sets a uniform maximum size for all entries. |
void |
setUniformMinSize(int minSize)
Sets a uniform minimum size for all entries. |
void |
setVisible(int index,
boolean flag)
Set the visible property of an item. |
Methods inherited from class com.eliad.model.AbstractGenericModel |
getListenerCount,
getListeners |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DefaultRulerModel(Intervals intervals, int orientation)
Intervals
instance,
that will provide implementation for the most important methods of the
AbstractRulerModel
API.intervals
- The underlying Intervals
object.orientation
- Whether this ruler is horizontal or vertical.public DefaultRulerModel(int numEntries, int size, int orientation)
Intervals
implementation.numEntries
- The initial number of items.size
- The initial uniform size of all items.orientation
- Whether this ruler is horizontal or vertical.Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
.public int getPreferredSize(int i)
i
- the index of the entry.Intervals.getIndex(int)
protected int doSetPreferredSize(int index, int size)
index
- the index of the entry.size
- the preferred size of the entrypublic int getTotalPreferredSize()
public void setFixedSize(int size)
public int getMinSize(int index)
index
- the index of the entry.Intervals.getIndex(int)
protected int doSetMinSize(int index, int size)
index
- the index of the entry.size
- the minimum size of the entrypublic void setUniformMinSize(int minSize)
setMinSize
calls
and then calls the superclass implementation.minSize
- the uniform minimum sizepublic int getTotalMinSize()
public int getMaxSize(int index)
index
- the index of the entry.Intervals.getIndex(int)
protected int doSetMaxSize(int index, int size)
index
- the index of the entry.size
- the maximum size of the entrypublic void setUniformMaxSize(int maxSize)
setMaxSize
calls
and then calls the superclass implementation.maxSize
- the uniform maximum sizepublic int getTotalMaxSize()
public void setVisible(int index, boolean flag)
totalXXX
properties
have specific caches here, and visibility changes the impact upon them.index
- the index where we want to set the visible propertyflag
- the visible property for the indexprotected void doInsertEntries(int start, int length, int value, boolean visible)
protected void doRemoveEntries(int start, int length)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |