pl.netanel.swt.matrix
Class Matrix<X extends java.lang.Number,Y extends java.lang.Number>

java.lang.Object
  extended by Canvas
      extended by pl.netanel.swt.matrix.Matrix<X,Y>
Type Parameters:
X - indexing type for the horizontal axis
Y - indexing type for the vertical axis
All Implemented Interfaces:
java.lang.Iterable<Zone<X,Y>>

public class Matrix<X extends java.lang.Number,Y extends java.lang.Number>
extends Canvas
implements java.lang.Iterable<Zone<X,Y>>

This class represents a two dimensional grid of cells. Uses custom painter to paint itself on the screen and responds to the user generated events. This is the main class in the package.

Styles:
SWT.SINGLE, SWT.MULTI, SWT.NO_FOCUS, SWT.CHECK, SWT.VIRTUAL
Events:
Selection, DefaultSelection


Nested Class Summary
static class Matrix.DropPosition
          Describes drop position for drag and drop moving
 
Field Summary
static int BACKWARD
          Denotes a backward direction
static int CMD_COLLAPSE
           
static int CMD_COPY
           
static int CMD_CUT
           
static int CMD_DELETE
          Command to delete (set to null) the values of the selected cells.
static int CMD_DND_MOVE_START
           
static int CMD_EDIT_ACTIVATE
          Command to activate the editor control by setting focus on it.
static int CMD_EDIT_APPLY
          Command to apply the value from the editor control to the model without deactivating the control.
static int CMD_EDIT_DEACTIVATE_APPLY
          Command to deactivate the editor control with applying it's value to the model.
static int CMD_EDIT_DEACTIVATE_CANCEL
          Command to deactivate the editor control without applying it's value to the model.
static int CMD_EXPAND
           
static int CMD_FOCUS_DOWN
           
static int CMD_FOCUS_LEFT
           
static int CMD_FOCUS_LOCATION
           
static int CMD_FOCUS_LOCATION_ALTER
           
static int CMD_FOCUS_MOST_DOWN
           
static int CMD_FOCUS_MOST_DOWN_RIGHT
           
static int CMD_FOCUS_MOST_LEFT
           
static int CMD_FOCUS_MOST_RIGHT
           
static int CMD_FOCUS_MOST_UP
           
static int CMD_FOCUS_MOST_UP_LEFT
           
static int CMD_FOCUS_PAGE_DOWN
           
static int CMD_FOCUS_PAGE_LEFT
           
static int CMD_FOCUS_PAGE_RIGHT
           
static int CMD_FOCUS_PAGE_UP
           
static int CMD_FOCUS_RIGHT
           
static int CMD_FOCUS_UP
           
static int CMD_ITEM_HIDE
           
static int CMD_ITEM_SHOW
           
static int CMD_PACK_COLUMN
           
static int CMD_PACK_ROW
           
static int CMD_PASTE
           
static int CMD_SELECT_ALL
           
static int CMD_SELECT_COLUMN
           
static int CMD_SELECT_COLUMN_ALTER
           
static int CMD_SELECT_DOWN
           
static int CMD_SELECT_FULL_DOWN
           
static int CMD_SELECT_FULL_DOWN_RIGHT
           
static int CMD_SELECT_FULL_LEFT
           
static int CMD_SELECT_FULL_RIGHT
           
static int CMD_SELECT_FULL_UP
           
static int CMD_SELECT_FULL_UP_LEFT
           
static int CMD_SELECT_LEFT
           
static int CMD_SELECT_PAGE_DOWN
           
static int CMD_SELECT_PAGE_LEFT
           
static int CMD_SELECT_PAGE_RIGHT
           
static int CMD_SELECT_PAGE_UP
           
static int CMD_SELECT_RIGHT
           
static int CMD_SELECT_ROW
           
static int CMD_SELECT_ROW_ALTER
           
static int CMD_SELECT_TO_COLUMN
           
static int CMD_SELECT_TO_COLUMN_ALTER
           
static int CMD_SELECT_TO_LOCATION
           
static int CMD_SELECT_TO_LOCATION_ALTER
           
static int CMD_SELECT_TO_ROW
           
static int CMD_SELECT_TO_ROW_ALTER
           
static int CMD_SELECT_UP
           
static int CMD_TRAVERSE_TAB_NEXT
           
static int CMD_TRAVERSE_TAB_PREVIOUS
           
static int EVENT_LAYOUT
           
static int FORWARD
          Denotes a forward direction
static int GESTURE_ON_SELECTED
          State bit indicating that the an item has been clicked again Value is 1<<9
static int PRINTABLE_CHARS
           
 
Constructor Summary
Matrix(Composite parent, int style)
          Calls the Matrix(Composite, int, Axis, Axis) constructor with null values for axisY and axisX which makes it to creates the default Integer axises with two sections.
Matrix(Composite parent, int style, Axis<X> axisX, Axis<Y> axisY)
          Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
 
Method Summary
 void addContentChangeCallback(java.lang.Runnable callback)
           
 void addListener(int eventType, Listener listener)
           
 void addPainter(int index, Painter<X,Y> painter)
          Inserts the painter at the given index of the receiver's painters list.
 void addPainter(Painter<X,Y> painter)
          Adds the painter at the end of the receiver's painters list.
 void bind(int commandId, int eventType, int code)
          Binds the command to the user gesture specified by the event type and code.
 Point computeSize(int wHint, int hHint)
           
 Point computeSize(int wHint, int hHint, boolean changed)
           
 void dispose()
           
 void execute(int commandId)
           
 Axis<X> getAxisX()
          Returns the column (horizontal) axis.
 Axis<Y> getAxisY()
          Returns the row (vertical) axis.
 Zone<X,Y> getBody()
          Returns the body zone of this matrix.
 boolean getCopyBeyondBody()
          Returns true if all the selected cells not only from the current zone should be copied with the copy command and false otherwise.
 boolean getCopyPasteHiddenCells()
          Returns true if the hidden cells should be copied with the copy command.
 Zone<X,Y> getHeaderX()
          Returns the column header zone of this matrix.
 Zone<X,Y> getHeaderXY()
          Returns the top left zone of this matrix.
 Zone<X,Y> getHeaderY()
          Returns the row header zone of this matrix.
 Painter<X,Y> getPainter(int index)
          Returns the painter at the specified position in the receiver's list of painters.
 Painter<X,Y> getPainter(java.lang.String name)
          Returns a painter with the specified name, or null if the painters list does not contain such painter.
 int getPainterCount()
          Returns the number of the receiver's painters.
 boolean getSelectSkipHidden()
          Returns true if the hidden cells should be selected with range select.
 Zone<X,Y> getZone(Section<X> sectionX, Section<Y> sectionY)
          Returns a zone located at the intersection of the given axis sections.
 int[] getZonePaintOrder()
          Returns order in which the zones will be painted.
 int indexOfPainter(java.lang.String name)
          Returns the index of a painter with the specified name in the list of the receiver's painters, or -1 if this list does not contain the element.
 java.util.Iterator<Zone<X,Y>> iterator()
           
 void refresh()
          Recalculates the matrix layout and repaints it.
 void removeContentChangeCallback(java.lang.Runnable callback)
           
 Painter<X,Y> removePainter(int index)
          Removes the element at the specified position in the list of painters.
 boolean removePainter(Painter<X,Y> painter)
          Removes the first occurrence of the specified element from this list, if it is present (optional operation).
 void replacePainter(Painter<X,Y> painter)
          Replaces the painter at the index of painter with the same name.
 void replacePainterPreserveStyle(Painter<X,Y> painter)
          Replaces the painter at the index of painter with the same name.
 void setCopyBeyondBody(boolean state)
          Will cause the matrix to copy selected cells from other zone than the current one as well when set to true.
 void setCopyPasteHiddenCells(boolean state)
          Will cause the matrix to copy the hidden cells when set to true.
 void setPainter(int index, Painter<X,Y> painter)
          Replaces the painter at the given index of the receiver's painters list.
 void setSelectSkipHidden(boolean state)
          Will cause the matrix to exclude the hidden cells from range select when set to true.
 void setZonePaintOrder(int[] order)
          Sets the order in which the zones will be painted.
 void transpose()
          Deprecated. 
 void unbind(int commandId, int eventType, int code)
          Removes the binding the command to the user gesture specified by the event type and code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORWARD

public static final int FORWARD
Denotes a forward direction

See Also:
Constant Field Values

BACKWARD

public static final int BACKWARD
Denotes a backward direction

See Also:
Constant Field Values

PRINTABLE_CHARS

public static final int PRINTABLE_CHARS
See Also:
Constant Field Values

CMD_FOCUS_UP

public static final int CMD_FOCUS_UP
See Also:
Constant Field Values

CMD_FOCUS_DOWN

public static final int CMD_FOCUS_DOWN
See Also:
Constant Field Values

CMD_FOCUS_LEFT

public static final int CMD_FOCUS_LEFT
See Also:
Constant Field Values

CMD_FOCUS_RIGHT

public static final int CMD_FOCUS_RIGHT
See Also:
Constant Field Values

CMD_FOCUS_PAGE_UP

public static final int CMD_FOCUS_PAGE_UP
See Also:
Constant Field Values

CMD_FOCUS_PAGE_DOWN

public static final int CMD_FOCUS_PAGE_DOWN
See Also:
Constant Field Values

CMD_FOCUS_PAGE_LEFT

public static final int CMD_FOCUS_PAGE_LEFT
See Also:
Constant Field Values

CMD_FOCUS_PAGE_RIGHT

public static final int CMD_FOCUS_PAGE_RIGHT
See Also:
Constant Field Values

CMD_FOCUS_MOST_LEFT

public static final int CMD_FOCUS_MOST_LEFT
See Also:
Constant Field Values

CMD_FOCUS_MOST_RIGHT

public static final int CMD_FOCUS_MOST_RIGHT
See Also:
Constant Field Values

CMD_FOCUS_MOST_UP

public static final int CMD_FOCUS_MOST_UP
See Also:
Constant Field Values

CMD_FOCUS_MOST_DOWN

public static final int CMD_FOCUS_MOST_DOWN
See Also:
Constant Field Values

CMD_FOCUS_MOST_UP_LEFT

public static final int CMD_FOCUS_MOST_UP_LEFT
See Also:
Constant Field Values

CMD_FOCUS_MOST_DOWN_RIGHT

public static final int CMD_FOCUS_MOST_DOWN_RIGHT
See Also:
Constant Field Values

CMD_FOCUS_LOCATION

public static final int CMD_FOCUS_LOCATION
See Also:
Constant Field Values

CMD_FOCUS_LOCATION_ALTER

public static final int CMD_FOCUS_LOCATION_ALTER
See Also:
Constant Field Values

CMD_SELECT_ALL

public static final int CMD_SELECT_ALL
See Also:
Constant Field Values

CMD_SELECT_UP

public static final int CMD_SELECT_UP
See Also:
Constant Field Values

CMD_SELECT_DOWN

public static final int CMD_SELECT_DOWN
See Also:
Constant Field Values

CMD_SELECT_LEFT

public static final int CMD_SELECT_LEFT
See Also:
Constant Field Values

CMD_SELECT_RIGHT

public static final int CMD_SELECT_RIGHT
See Also:
Constant Field Values

CMD_SELECT_PAGE_UP

public static final int CMD_SELECT_PAGE_UP
See Also:
Constant Field Values

CMD_SELECT_PAGE_DOWN

public static final int CMD_SELECT_PAGE_DOWN
See Also:
Constant Field Values

CMD_SELECT_PAGE_LEFT

public static final int CMD_SELECT_PAGE_LEFT
See Also:
Constant Field Values

CMD_SELECT_PAGE_RIGHT

public static final int CMD_SELECT_PAGE_RIGHT
See Also:
Constant Field Values

CMD_SELECT_FULL_UP

public static final int CMD_SELECT_FULL_UP
See Also:
Constant Field Values

CMD_SELECT_FULL_DOWN

public static final int CMD_SELECT_FULL_DOWN
See Also:
Constant Field Values

CMD_SELECT_FULL_LEFT

public static final int CMD_SELECT_FULL_LEFT
See Also:
Constant Field Values

CMD_SELECT_FULL_RIGHT

public static final int CMD_SELECT_FULL_RIGHT
See Also:
Constant Field Values

CMD_SELECT_FULL_UP_LEFT

public static final int CMD_SELECT_FULL_UP_LEFT
See Also:
Constant Field Values

CMD_SELECT_FULL_DOWN_RIGHT

public static final int CMD_SELECT_FULL_DOWN_RIGHT
See Also:
Constant Field Values

CMD_SELECT_TO_LOCATION

public static final int CMD_SELECT_TO_LOCATION
See Also:
Constant Field Values

CMD_SELECT_TO_LOCATION_ALTER

public static final int CMD_SELECT_TO_LOCATION_ALTER
See Also:
Constant Field Values

CMD_SELECT_ROW

public static final int CMD_SELECT_ROW
See Also:
Constant Field Values

CMD_SELECT_ROW_ALTER

public static final int CMD_SELECT_ROW_ALTER
See Also:
Constant Field Values

CMD_SELECT_COLUMN

public static final int CMD_SELECT_COLUMN
See Also:
Constant Field Values

CMD_SELECT_COLUMN_ALTER

public static final int CMD_SELECT_COLUMN_ALTER
See Also:
Constant Field Values

CMD_SELECT_TO_ROW

public static final int CMD_SELECT_TO_ROW
See Also:
Constant Field Values

CMD_SELECT_TO_ROW_ALTER

public static final int CMD_SELECT_TO_ROW_ALTER
See Also:
Constant Field Values

CMD_SELECT_TO_COLUMN

public static final int CMD_SELECT_TO_COLUMN
See Also:
Constant Field Values

CMD_SELECT_TO_COLUMN_ALTER

public static final int CMD_SELECT_TO_COLUMN_ALTER
See Also:
Constant Field Values

CMD_CUT

public static final int CMD_CUT
See Also:
Constant Field Values

CMD_COPY

public static final int CMD_COPY
See Also:
Constant Field Values

CMD_PASTE

public static final int CMD_PASTE
See Also:
Constant Field Values

CMD_EDIT_ACTIVATE

public static final int CMD_EDIT_ACTIVATE
Command to activate the editor control by setting focus on it.

See Also:
Constant Field Values

CMD_EDIT_DEACTIVATE_APPLY

public static final int CMD_EDIT_DEACTIVATE_APPLY
Command to deactivate the editor control with applying it's value to the model.

See Also:
Constant Field Values

CMD_EDIT_DEACTIVATE_CANCEL

public static final int CMD_EDIT_DEACTIVATE_CANCEL
Command to deactivate the editor control without applying it's value to the model.

See Also:
Constant Field Values

CMD_EDIT_APPLY

public static final int CMD_EDIT_APPLY
Command to apply the value from the editor control to the model without deactivating the control.

See Also:
Constant Field Values

CMD_DELETE

public static final int CMD_DELETE
Command to delete (set to null) the values of the selected cells.

See Also:
Constant Field Values

CMD_ITEM_HIDE

public static final int CMD_ITEM_HIDE
See Also:
Constant Field Values

CMD_ITEM_SHOW

public static final int CMD_ITEM_SHOW
See Also:
Constant Field Values

CMD_PACK_COLUMN

public static final int CMD_PACK_COLUMN
See Also:
Constant Field Values

CMD_PACK_ROW

public static final int CMD_PACK_ROW
See Also:
Constant Field Values

CMD_DND_MOVE_START

public static final int CMD_DND_MOVE_START
See Also:
Constant Field Values

CMD_TRAVERSE_TAB_NEXT

public static final int CMD_TRAVERSE_TAB_NEXT
See Also:
Constant Field Values

CMD_TRAVERSE_TAB_PREVIOUS

public static final int CMD_TRAVERSE_TAB_PREVIOUS
See Also:
Constant Field Values

CMD_EXPAND

public static final int CMD_EXPAND
See Also:
Constant Field Values

CMD_COLLAPSE

public static final int CMD_COLLAPSE
See Also:
Constant Field Values

GESTURE_ON_SELECTED

public static final int GESTURE_ON_SELECTED
State bit indicating that the an item has been clicked again Value is 1<<9

See Also:
Constant Field Values

EVENT_LAYOUT

public static final int EVENT_LAYOUT
See Also:
Constant Field Values
Constructor Detail

Matrix

public Matrix(Composite parent,
              int style)
Calls the Matrix(Composite, int, Axis, Axis) constructor with null values for axisY and axisX which makes it to creates the default Integer axises with two sections.


Matrix

public Matrix(Composite parent,
              int style,
              Axis<X> axisX,
              Axis<Y> axisY)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherzted from super classes.

It the axisY or axisX is null then the axis is created with the Axis.Axis() constructor.

The axises will be configured with default cell width for X axis and scroll/resize offsets, so any changes to those values should be done after matrix is constructed.

If any of zones has zero painters then default painters are attached.

Parameters:
parent - a composite control which will be the parent of the new instance (cannot be null)
style - the style of control to construct
axisY - vertical axis for the matrix
axisX - horizontal axis for the matrix
Throws:
java.lang.IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the parent is null
SWTException -
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
  • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
See Also:
Widget#getStyle
Method Detail

dispose

public void dispose()

addListener

public void addListener(int eventType,
                        Listener listener)

getAxisX

public Axis<X> getAxisX()
Returns the column (horizontal) axis.

Returns:
the column (horizontal) axis

getAxisY

public Axis<Y> getAxisY()
Returns the row (vertical) axis.

Returns:
the row (vertical) axis

getBody

public Zone<X,Y> getBody()
Returns the body zone of this matrix.

Returns:
the body zone of this matrix

getHeaderX

public Zone<X,Y> getHeaderX()
Returns the column header zone of this matrix.

Returns:
the column header zone of this matrix

getHeaderY

public Zone<X,Y> getHeaderY()
Returns the row header zone of this matrix.

Returns:
the row header zone of this matrix

getHeaderXY

public Zone<X,Y> getHeaderXY()
Returns the top left zone of this matrix.

Returns:
the top left zone of this matrix

getZone

public Zone<X,Y> getZone(Section<X> sectionX,
                         Section<Y> sectionY)
Returns a zone located at the intersection of the given axis sections.

Parameters:
sectionX - section of the horizontal axis
sectionY - section of the vertical axis
Returns:
zone located at the intersection of the given axis sections
Throws:
java.lang.IllegalArgumentException - if item is null or there is no zone for the given sections

refresh

public void refresh()
Recalculates the matrix layout and repaints it. It can be called after changing the model for example to reflect the changes on the screen.


bind

public void bind(int commandId,
                 int eventType,
                 int code)
Binds the command to the user gesture specified by the event type and code. Code is a logical OR of key, state mask and mouse button codes.


unbind

public void unbind(int commandId,
                   int eventType,
                   int code)
Removes the binding the command to the user gesture specified by the event type and code. Code is a logical OR of key, state mask and mouse button codes.


getZonePaintOrder

public int[] getZonePaintOrder()
Returns order in which the zones will be painted.

Returns:
an array of zone indexes indicating the paint order of zones

setZonePaintOrder

public void setZonePaintOrder(int[] order)
Sets the order in which the zones will be painted.

Parameters:
order - an array of zone indexes indicating the paint order of zones

addPainter

public void addPainter(Painter<X,Y> painter)
Adds the painter at the end of the receiver's painters list.

Parameters:
painter - the painter to be added

addPainter

public void addPainter(int index,
                       Painter<X,Y> painter)
Inserts the painter at the given index of the receiver's painters list.

Parameters:
index - at which the specified painter is to be inserted
painter - painter to be inserted
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range ( index < 0 || index >= getPainterCount())
java.lang.IllegalArgumentException - if the painter is null
java.lang.IllegalArgumentException - if the painter's name already exists in the collection of painters.

setPainter

public void setPainter(int index,
                       Painter<X,Y> painter)
Replaces the painter at the given index of the receiver's painters list.

Parameters:
index - index of the element to replace
painter - painter to be stored at the specified position
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range ( index < 0 || index >= getPainterCount()) *
java.lang.IllegalArgumentException - if the painter is null
java.lang.IllegalArgumentException - if the painter's name already exists in the collection of painters.

replacePainter

public void replacePainter(Painter<X,Y> painter)
Replaces the painter at the index of painter with the same name. If a painter with the specified name does not exist, then the new painter is added at the end.

Parameters:
painter - painter to replace a painter with the same name
Throws:
java.lang.IllegalArgumentException - if the painter is null

replacePainterPreserveStyle

public void replacePainterPreserveStyle(Painter<X,Y> painter)
Replaces the painter at the index of painter with the same name. If a painter with the specified name does not exist, then the new painter is added at the end.

The new painter inherits the style from the painter that's being replaced. This helps for example to change text in the headers without the need to re-apply all the styling data, like background color, selections colors, etc.

Parameters:
painter - painter to replace a painter with the same name
Throws:
java.lang.IllegalArgumentException - if the painter is null

removePainter

public Painter<X,Y> removePainter(int index)
Removes the element at the specified position in the list of painters. Shifts any subsequent painters to the left (subtracts one from their indices). Returns the painter that was removed from the list.

Parameters:
index - the index of the painter to be removed
Returns:
the painter previously at the specified position
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range ( index < 0 || index >= getPainterCount())

removePainter

public boolean removePainter(Painter<X,Y> painter)
Removes the first occurrence of the specified element from this list, if it is present (optional operation). If this list does not contain the element, it is unchanged.

Parameters:
painter - element to be removed from this list, if present
Returns:
true if this list contained the specified element
Throws:
java.lang.ClassCastException - if the type of the specified element is incompatible with this list (optional)
java.lang.IllegalArgumentException - if the painter is null

indexOfPainter

public int indexOfPainter(java.lang.String name)
Returns the index of a painter with the specified name in the list of the receiver's painters, or -1 if this list does not contain the element.

Parameters:
name - painter name to search for
Returns:
the index of a painter with the specified name
Throws:
java.lang.IllegalArgumentException - if the name is null

getPainter

public Painter<X,Y> getPainter(java.lang.String name)
Returns a painter with the specified name, or null if the painters list does not contain such painter.

Parameters:
name - painter name to search for
Returns:
painter with the specified name
Throws:
java.lang.IllegalArgumentException - if the name is null or there is no painter with the given name

getPainterCount

public int getPainterCount()
Returns the number of the receiver's painters.

Returns:
the number of the receiver's painters

getPainter

public Painter<X,Y> getPainter(int index)
Returns the painter at the specified position in the receiver's list of painters.

Parameters:
index - index of the painter to return
Returns:
the painter at the specified position in the receiver's list of painters.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range ( index < 0 || index >= getPainterCount())

iterator

public java.util.Iterator<Zone<X,Y>> iterator()
Specified by:
iterator in interface java.lang.Iterable<Zone<X extends java.lang.Number,Y extends java.lang.Number>>

execute

public void execute(int commandId)

computeSize

public Point computeSize(int wHint,
                         int hHint)

computeSize

public Point computeSize(int wHint,
                         int hHint,
                         boolean changed)

transpose

@Deprecated
public void transpose()
Deprecated. 

Switch X and Y axises. Axis state is preserved, but zones are recreated.


setSelectSkipHidden

public void setSelectSkipHidden(boolean state)
Will cause the matrix to exclude the hidden cells from range select when set to true. Otherwise the hidden cells will be selected.

Default value is false.

Parameters:
state - the new state for the "select hidden cells" property

getSelectSkipHidden

public boolean getSelectSkipHidden()
Returns true if the hidden cells should be selected with range select.

Returns:
the state of the "copy paste hidden cells" property

setCopyPasteHiddenCells

public void setCopyPasteHiddenCells(boolean state)
Will cause the matrix to copy the hidden cells when set to true. Otherwise the hidden cells will not be copied.

Default value is false.

Parameters:
state - the new state for the "select hidden cells" property

getCopyPasteHiddenCells

public boolean getCopyPasteHiddenCells()
Returns true if the hidden cells should be copied with the copy command.

Returns:
the state of the "copy paste hidden cells" property

setCopyBeyondBody

public void setCopyBeyondBody(boolean state)
Will cause the matrix to copy selected cells from other zone than the current one as well when set to true. Otherwise the only cells from the current zone will be copied. "Current" means the zone with the focus cell.

Default value is false.

Parameters:
state - the new state for the "copy paste beyond body" property

getCopyBeyondBody

public boolean getCopyBeyondBody()
Returns true if all the selected cells not only from the current zone should be copied with the copy command and false otherwise.

Returns:
the state of the "copy beyond body" property

addContentChangeCallback

public void addContentChangeCallback(java.lang.Runnable callback)

removeContentChangeCallback

public void removeContentChangeCallback(java.lang.Runnable callback)


Copyright © 2011 netanel.pl. All Rights Reserved.