Style Intelligence v12.0

inetsoft.report.filter
Class HighlightGroup

java.lang.Object
  extended by inetsoft.report.filter.HighlightGroup
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable

public class HighlightGroup
extends Object
implements Cloneable, inetsoft.util.XMLSerializable, Serializable

HighLight expert group class. This class defines a HighLight Group.

See Also:
Serialized Form

Nested Class Summary
static class HighlightGroup.HighlightAppliedEvent
          Event that signals that a highlight was applied.
static interface HighlightGroup.HighlightAppliedListener
          Listener that is notified when a highlight has been applied.
 
Field Summary
static String DEFAULT_LEVEL
          The name of the default binding level.
 
Constructor Summary
HighlightGroup()
          Create an empty HighLightGroup.
 
Method Summary
 void addHighlight(String name, Highlight value)
          Adds a highlight to the default level.
 void addHighlight(String level, String name, Highlight value)
          Adds a highlight to the specified level.
 void addHighlightAppliedListener(HighlightGroup.HighlightAppliedListener l)
          Adds a listener that is notified when a highlight is applied.
 Object clone()
          Clone the highlight group.
 boolean equals(Object obj)
          Check if equals another highlight group.
 Highlight findGroup(Object value)
          Finds the highlight in the default level whose conditions match the specified value.
 Highlight findGroup(String level, Object value)
          Finds the highlight in the specified level whose conditions match the specified value.
 Highlight findGroup(String level, TableLens lens, int row)
          Finds the highlight in the specified level whose conditions match a value in the specified row of a table.
 Highlight findGroup(String level, TableLens lens, int row, int col)
          Finds the highlight in the specified level whose conditions match a value in the specified cell of a table.
 Highlight findGroup(TableLens lens, int row)
          Finds the highlight in the default level whose conditions match a value in the specified row of a table.
 Highlight findGroup(TableLens lens, int row, int col)
          Finds the highlight in the default level whose conditions match a value in the specified cell of a table.
 int getAllLevelsHighlightCount()
          Gets the number of highlights applied to all levels in this group.
 UserVariable[] getAllVariables()
          Gets all variables defined on the highlights in this group.
 Highlight getHighlight(String name)
          Gets the highlight with the specified name from the default level.
 Highlight getHighlight(String level, String name)
          Gets the highlight with the specified name.
 int getHighlightCount()
          Gets the number of highlights applied to the default level.
 int getHighlightCount(String level)
          Gets the number of highlights applied to the specified level.
 int getLevelCount()
          Gets the number of levels to which highlights have been applied.
 String[] getLevels()
          Gets the names of the levels to which highlights have been applied.
 String[] getNames()
          Gets the names of the highlights that are applied to the default level.
 String[] getNames(String level)
          Gets the names of the highlights that are applied to the specified level.
 Object getQuerySandbox()
          Getter of asset query sandbox.
 boolean isAllLevelsEmpty()
          Determines if no highlights are applied to any level in this group.
 boolean isEmpty()
          Determines if no highlights are applied to the default level.
 boolean isEmpty(String level)
          Determines if no highlights are applied to the specified level.
 void moveHighlight(String level, int idx1, int idx2, String name1, String name2)
          Exchange the positions of two specified highlight.
 void parseXML(Element tag)
          Loads the properties of this object from an XML representation.
 void refresh()
          Clears all cached condition data.
 void removeHighlight(String name)
          Removes the named highlight from the default level.
 void removeHighlight(String level, String name)
          Removes the named highlight from the specified level.
 void removeHighlightAppliedListener(HighlightGroup.HighlightAppliedListener l)
          Removes a listener from the notification list.
 void removeHighlights(String level)
          Removes the highlights.
 void renameHighlight(String oname, String nname, Highlight lt)
          Rename the highlight and keep the orders.
 void renameHighlight(String olevel, String oname, String nlevel, String nname, Highlight lt)
          Rename the highlight and keep the orders.
 void replaceVariables(VariableTable vars)
          Replaces the variable defined on the highlights with those provided.
 void setQuerySandbox(Object box)
          Setter of asset query sandbox.
 String toString()
          Get the string representation.
 void validate()
          Validate the highlight group.
 void writeXML(PrintWriter writer)
          Writes an XML representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_LEVEL

public static final String DEFAULT_LEVEL
The name of the default binding level.

See Also:
Constant Field Values
Constructor Detail

HighlightGroup

public HighlightGroup()
Create an empty HighLightGroup.

Method Detail

addHighlight

public void addHighlight(String name,
                         Highlight value)
Adds a highlight to the default level.

Parameters:
name - the name of the highlight.
value - the highlight definition.

addHighlight

public void addHighlight(String level,
                         String name,
                         Highlight value)
Adds a highlight to the specified level.

Parameters:
level - the level to which the highlight applies.
name - the name of the highlight.
value - the highlight definition.
Since:
8.5

getHighlight

public Highlight getHighlight(String name)
Gets the highlight with the specified name from the default level.

Parameters:
name - the name of the highlight.
Returns:
the highlight definition or null if no such highlight exists.

getHighlight

public Highlight getHighlight(String level,
                              String name)
Gets the highlight with the specified name.

Parameters:
level - the level to which the highlight applies.
name - the name of the highlight.
Returns:
the highlight definition or null if no such highlight exists.
Since:
8.5

getHighlightCount

public int getHighlightCount()
Gets the number of highlights applied to the default level.

Returns:
the number of highlights.

getHighlightCount

public int getHighlightCount(String level)
Gets the number of highlights applied to the specified level.

Parameters:
level - the name of the level.
Returns:
the number of highlights.
Since:
8.5

getAllLevelsHighlightCount

public int getAllLevelsHighlightCount()
Gets the number of highlights applied to all levels in this group.

Returns:
the number of highlights.
Since:
8.5

getLevelCount

public int getLevelCount()
Gets the number of levels to which highlights have been applied.

Returns:
the number of levels.
Since:
8.5

getLevels

public String[] getLevels()
Gets the names of the levels to which highlights have been applied.

Returns:
the names of the levels.

isAllLevelsEmpty

public boolean isAllLevelsEmpty()
Determines if no highlights are applied to any level in this group.

Returns:
true if no highlights have been added; false otherwise.
Since:
8.5

isEmpty

public boolean isEmpty()
Determines if no highlights are applied to the default level.

Returns:
true if no highlights have been added; false otherwise.

isEmpty

public boolean isEmpty(String level)
Determines if no highlights are applied to the specified level.

Parameters:
level - the name of the level.
Returns:
true if no highlights have been added; false otherwise.
Since:
8.5

removeHighlights

public void removeHighlights(String level)
Removes the highlights.

Parameters:
level - the name of the level.

removeHighlight

public void removeHighlight(String name)
Removes the named highlight from the default level.

Parameters:
name - the name of the highlight.

removeHighlight

public void removeHighlight(String level,
                            String name)
Removes the named highlight from the specified level.

Parameters:
level - the name of the level.
name - the name of the highlight.
Since:
8.5

renameHighlight

public void renameHighlight(String oname,
                            String nname,
                            Highlight lt)
Rename the highlight and keep the orders.

Parameters:
oname - the old name of the highlight.
nname - the new name of the highlight.
lt - the highlight object.

renameHighlight

public void renameHighlight(String olevel,
                            String oname,
                            String nlevel,
                            String nname,
                            Highlight lt)
Rename the highlight and keep the orders.

Parameters:
olevel - the old level.
oname - the old name of the highlight.
nlevel - the new level.
nname - the new name of the highlight.
lt - the highlight object.

moveHighlight

public void moveHighlight(String level,
                          int idx1,
                          int idx2,
                          String name1,
                          String name2)
Exchange the positions of two specified highlight.

Parameters:
idx1 - the first index.

getNames

public String[] getNames()
Gets the names of the highlights that are applied to the default level.

Returns:
the names of the highlights.

getNames

public String[] getNames(String level)
Gets the names of the highlights that are applied to the specified level.

Parameters:
level - the name of the level.
Returns:
the names of the highlights.
Since:
8.5

findGroup

public Highlight findGroup(Object value)
Finds the highlight in the default level whose conditions match the specified value.

Parameters:
value - the value to evaluate.
Returns:
the matching highlight or null if none match.

findGroup

public Highlight findGroup(String level,
                           Object value)
Finds the highlight in the specified level whose conditions match the specified value.

Parameters:
level - the name of the level.
value - the value to evaluate.
Returns:
the matching highlight or null if none match.
Since:
8.5

findGroup

public Highlight findGroup(TableLens lens,
                           int row)
Finds the highlight in the default level whose conditions match a value in the specified row of a table.

Parameters:
lens - the TableLens whose values to evaluate.
row - the table row index to evaluate.
Returns:
the matching highlight or null if none match.

findGroup

public Highlight findGroup(String level,
                           TableLens lens,
                           int row)
Finds the highlight in the specified level whose conditions match a value in the specified row of a table.

Parameters:
level - the name of the level.
lens - the TableLens whose values will be evaluated.
row - the table row index to evaluate.
Returns:
the matching highlight or null if none match.
Since:
8.5

findGroup

public Highlight findGroup(TableLens lens,
                           int row,
                           int col)
Finds the highlight in the default level whose conditions match a value in the specified cell of a table.

Parameters:
lens - the TableLens whose values will be evaluated.
row - the table row index of the value to evaluate.
col - the table column index of the value to evaluate.
Returns:
the matching highlight or null if none match.

findGroup

public Highlight findGroup(String level,
                           TableLens lens,
                           int row,
                           int col)
Finds the highlight in the specified level whose conditions match a value in the specified cell of a table.

Parameters:
level - the name of the level.
lens - the TableLens whose values will be evaluated.
row - the table row index of the value to evaluate.
col - the table column index of the value to evaluate.
Returns:
the matching highlight or null if none match.
Since:
8.5

refresh

public void refresh()
Clears all cached condition data.


validate

public void validate()
Validate the highlight group.


getAllVariables

public UserVariable[] getAllVariables()
Gets all variables defined on the highlights in this group.

Returns:
the defined variables.

replaceVariables

public void replaceVariables(VariableTable vars)
Replaces the variable defined on the highlights with those provided.

Parameters:
vars - the new variable values.

writeXML

public void writeXML(PrintWriter writer)
Writes an XML representation of this object.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Parameters:
writer - the writer to which the XML will be written.

parseXML

public void parseXML(Element tag)
              throws Exception
Loads the properties of this object from an XML representation.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Parameters:
tag - the XML representation of this object.
Throws:
Exception - if an error occurs during parsing.

clone

public Object clone()
Clone the highlight group.

Overrides:
clone in class Object

equals

public boolean equals(Object obj)
Check if equals another highlight group.

Overrides:
equals in class Object

toString

public String toString()
Get the string representation.

Overrides:
toString in class Object

getQuerySandbox

public Object getQuerySandbox()
Getter of asset query sandbox.


setQuerySandbox

public void setQuerySandbox(Object box)
Setter of asset query sandbox.


addHighlightAppliedListener

public void addHighlightAppliedListener(HighlightGroup.HighlightAppliedListener l)
Adds a listener that is notified when a highlight is applied.

Parameters:
l - the listener to add.

removeHighlightAppliedListener

public void removeHighlightAppliedListener(HighlightGroup.HighlightAppliedListener l)
Removes a listener from the notification list.

Parameters:
l - the listener to remove.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.