com.f1j.ss.datarange
Interface Section

All Known Subinterfaces:
Section

public interface Section
extends AbstractSection

This interface defines the API for a single section that can be created in in the row and column areas of a DataRange.

See Also:
DataRange

Method Summary
 Section getChild(int index)
          Returns a child section by index.
 Section getChild(java.lang.String name)
          Returns a child section by index.
 Section getChildAt(int position)
          Returns the child section that is located at the specified row/column position within this section.
 int getChildCount()
          Returns the number of child sections for this section.
 java.lang.String getCommands()
          Returns the Report Function commands for this section.
 java.lang.String getFullName()
          Returns the fully qualified name of the section.
 GrantExpression getGrantExpression()
          Returns the GrantExpression being used to secure this section.
 int getIndex()
          Returns the index of this section within its parent section.
 java.lang.String getName()
          Returns the name of the section.
 boolean isAutoSized()
          Returns whether this rows/columns corresponding to this section will be autosized.
 void setAutoSize(boolean autoSize)
          Sets the auto-size property for this section so that corresponding rows/columns will be resized.
 void setCommands(java.lang.String commands)
          Sets the Report Functions for this section.
 void setGrantExpression(GrantExpression expression)
          Sets the GrantExpression that should be used to secure this section.
 void setName(java.lang.String name)
          Sets the name of the section.
 void shrinkAt(int position)
          This method will shrink the size of this section by one row or column, starting at the specified position within the section.
 
Methods inherited from interface com.f1j.ss.datarange.AbstractSection
createParent, delete, getEnd, getParent, getSize, getStart, insertAfter, insertBefore, isDeleted, isInRowArea, isLeaf, isRoot, remove
 
Methods inherited from interface com.f1j.util.Lockable
getLock, releaseLock
 

Method Detail

getIndex

public int getIndex()
Returns the index of this section within its parent section. A root section will always return an index of 0.
Since:
12.0

getFullName

public java.lang.String getFullName()
Returns the fully qualified name of the section. This will include all of the parent section names.
Returns:
the String value of the section name.
Since:
12.0

getName

public java.lang.String getName()
Returns the name of the section. The section name can be blank.
Returns:
the String value of the section name.
Since:
12.0

setName

public void setName(java.lang.String name)
             throws com.f1j.util.InvalidNameException,
                    F1UnsupportedOperationException
Sets the name of the section. The name must begin with an alpha character or an underscore. All other characters can be alphanumeric or an underscore. A root section cannot be renamed. A section cannot use the same name as a data query. Top-level sections must be unique. A top-level section is a section that is a child of the root or a child of an anonymous section. Sibling sections must also be unique.
Parameters:
name - The new name of the section.
Throws:
com.f1j.ss.datarange.InvalidNameException - if name contains an illegal character or the name collides with an existing DataQuery.
F1UnsupportedOperationException - if trying to name a leaf or root section.
Since:
12.0
See Also:
DataRange, DataQuery

getChild

public Section getChild(int index)
                 throws com.f1j.util.InvalidIndexException
Returns a child section by index. A child is a section that is a direct descendant of this section. Valid values are between 0 and getChildCount().
Parameters:
index - The index of the child section to be returned.
Returns:
the child section at the specified position.
Throws:
com.f1j.util.InvalidIndexException, -  
Since:
12.0

getChild

public Section getChild(java.lang.String name)
                 throws com.f1j.ss.datarange.InvalidNameException
Returns a child section by index. A child is a section that is a direct descendant of this section. Valid values are between 0 and getChildCount().
Parameters:
name - The new name of the child section to be returned.
Returns:
the child section with the specified name.
Throws:
com.f1j.ss.datarange.InvalidNameException - if the name is null or empty string.
Since:
12.0

getChildAt

public Section getChildAt(int position)
Returns the child section that is located at the specified row/column position within this section. A child is a section that is a direct descendant of this section. Valid values are between 0 and getSize().
Returns:
the child section at the specified index.
Since:
12.0

getChildCount

public int getChildCount()
Returns the number of child sections for this section. A child is a section that is a direct descendant of this section.
Returns:
the number of child sections for this section.
Since:
12.0

shrinkAt

public void shrinkAt(int position)
This method will shrink the size of this section by one row or column, starting at the specified position within the section.
Parameters:
position - The position where the section should be shrunk.
Since:
12.0
See Also:
DataRange

getCommands

public java.lang.String getCommands()
Returns the Report Function commands for this section.
Returns:
the Report Function commands for this section.
Since:
12.0
See Also:
DataRange

setCommands

public void setCommands(java.lang.String commands)
                 throws InvalidArgumentException,
                        SelectionException
Sets the Report Functions for this section.
Parameters:
commands - the Report Functions for this section.
Throws:
InvalidArgumentException - if the commands are invalid.
SelectionException - if trying to set commands on a root or leaf section.
Since:
12.0
See Also:
DataRange

setGrantExpression

public void setGrantExpression(GrantExpression expression)
Sets the GrantExpression that should be used to secure this section. Setting to null, removes all security.
Parameters:
expression - The grant expression to be used to secure this section.
Since:
12.0
See Also:
GrantExpression

getGrantExpression

public GrantExpression getGrantExpression()
Returns the GrantExpression being used to secure this section. Returns null if this section has not been secured.
Returns:
the GrantExpression being used to secure this section.
Since:
12.0
See Also:
GrantExpression

isAutoSized

public boolean isAutoSized()
Returns whether this rows/columns corresponding to this section will be autosized.
Returns:
the auto-size property.
Since:
12.0

setAutoSize

public void setAutoSize(boolean autoSize)
Sets the auto-size property for this section so that corresponding rows/columns will be resized.
Parameters:
autoSize - the auto-size value.
Since:
12.0