JRubik v0.6

es.aeat.eett.plugins.tableNavi.tableRubik
Class TablePreparator

java.lang.Object
  extended byes.aeat.eett.plugins.tableNavi.tableRubik.TablePreparator
All Implemented Interfaces:
ConfiTableListener, java.util.EventListener, com.tonbeller.jpivot.core.ModelChangeListener

public class TablePreparator
extends java.lang.Object
implements com.tonbeller.jpivot.core.ModelChangeListener, ConfiTableListener

Author:
f00992

en:

es: Esta clase da soporte al modelo de datos de tableRubik. Cuando cambia OlapModel o la configuracion de la tabla informa a los oyentes registrados mediante el metodo 'dataChanged()' de la interfaz 'TablePreparatorListener'.


Field Summary
private static java.lang.String ACTUALIZE_TABLE
           
private  boolean autoUpdate
           
private  int colIniData
           
private  int colsCount
           
private  int colsInHeader
           
private  int dimCount
           
private  boolean dirty
           
private static java.lang.String EMPTY_REULT
           
private  java.lang.Boolean false_
           
private  int iMeasure
           
private static TablePreparator instance
           
private  java.util.List listeners
           
private static java.util.ResourceBundle localizationResources
           
private static org.apache.log4j.Logger logger
           
private  javax.swing.tree.DefaultMutableTreeNode nBody
           
private  javax.swing.tree.DefaultMutableTreeNode nCorner
           
private  javax.swing.tree.DefaultMutableTreeNode nHead
           
private  javax.swing.tree.DefaultMutableTreeNode nMeasure
           
private  javax.swing.tree.DefaultMutableTreeNode nTable
           
private  boolean resultEmpty
           
private  int rowsInBody
           
private  int rowsInHeader
           
private static java.lang.String SPACE
           
private  java.lang.Object[][] tableBody
           
private  TableComponent tableComponent
           
private  boolean tableEmpty
           
private  java.lang.Object[][] tableHead
           
private  java.lang.Boolean true_
           
 
Constructor Summary
private TablePreparator()
           
 
Method Summary
 void addListener(TablePreparatorListener tablePreparatorListener)
           
private  void build()
           
private  void changeMeasureCaption()
           
private  void clear()
           
private  void confiSpan()
           
 void confiTableChanged()
          Informa de un cambio en la configuracion de la table
private  void createTable(boolean isTableHead)
           
private  void createTableEmpty()
           
 void fireDataChanged()
           
(package private)  int getColIniData()
           
(package private)  int getColsCount()
           
(package private)  int getColsInHeader()
           
(package private)  int getDimCount()
           
(package private)  int getIMeasure()
           
static TablePreparator getInstance()
           
 java.util.List getListeners()
           
(package private)  javax.swing.tree.DefaultMutableTreeNode getNBody()
           
(package private)  javax.swing.tree.DefaultMutableTreeNode getNCorner()
           
(package private)  javax.swing.tree.DefaultMutableTreeNode getNHead()
           
(package private)  javax.swing.tree.DefaultMutableTreeNode getNMeasure()
           
(package private)  javax.swing.tree.DefaultMutableTreeNode getNTable()
           
(package private)  int getRowsInBody()
           
(package private)  int getRowsInHeader()
           
(package private)  java.lang.Object[][] getTableBody()
           
(package private)  java.lang.Object[][] getTableHead()
           
private  void ini()
           
private  int iniCellInAux(java.lang.Object[][] table, int ir, int ic, RubikCell c)
           
private  void iniCorner()
           
private  void iniMeasure()
           
private  void iniResultIsEmpty()
           
 boolean isAutoUpdate()
           
private  boolean isMeasure(RubikCell c)
           
(package private)  boolean isResultEmpty()
           
(package private)  boolean isTableEmpty()
           
 void modelChanged(com.tonbeller.jpivot.core.ModelChangeEvent arg0)
           
private  void printTable(java.lang.Object[][] table)
           
 void removeListener(TablePreparatorListener tablePreparatorListener)
           
 void setAutoUpdate(boolean autoUpdate)
           
 void structureChanged(com.tonbeller.jpivot.core.ModelChangeEvent arg0)
           
private  void update()
           
private  void updateLeaf(javax.swing.tree.DefaultMutableTreeNode n)
           
private  void updateMeasure()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localizationResources

private static final java.util.ResourceBundle localizationResources

logger

private static org.apache.log4j.Logger logger

EMPTY_REULT

private static final java.lang.String EMPTY_REULT

ACTUALIZE_TABLE

private static final java.lang.String ACTUALIZE_TABLE

SPACE

private static final java.lang.String SPACE
See Also:
Constant Field Values

nTable

private javax.swing.tree.DefaultMutableTreeNode nTable

nHead

private javax.swing.tree.DefaultMutableTreeNode nHead

nBody

private javax.swing.tree.DefaultMutableTreeNode nBody

nCorner

private javax.swing.tree.DefaultMutableTreeNode nCorner

nMeasure

private javax.swing.tree.DefaultMutableTreeNode nMeasure

rowsInHeader

private int rowsInHeader

rowsInBody

private int rowsInBody

colsInHeader

private int colsInHeader

colIniData

private int colIniData

colsCount

private int colsCount

resultEmpty

private boolean resultEmpty

tableEmpty

private boolean tableEmpty

dimCount

private int dimCount

iMeasure

private int iMeasure

tableHead

private java.lang.Object[][] tableHead

tableBody

private java.lang.Object[][] tableBody

true_

private java.lang.Boolean true_

false_

private java.lang.Boolean false_

autoUpdate

private boolean autoUpdate

dirty

private boolean dirty

listeners

private java.util.List listeners

tableComponent

private TableComponent tableComponent

instance

private static TablePreparator instance
Constructor Detail

TablePreparator

private TablePreparator()
                 throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getInstance

public static TablePreparator getInstance()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

addListener

public void addListener(TablePreparatorListener tablePreparatorListener)

removeListener

public void removeListener(TablePreparatorListener tablePreparatorListener)

getListeners

public java.util.List getListeners()

fireDataChanged

public void fireDataChanged()

update

private void update()

build

private void build()

changeMeasureCaption

private void changeMeasureCaption()

iniCorner

private void iniCorner()

ini

private void ini()

clear

private void clear()

iniResultIsEmpty

private void iniResultIsEmpty()

iniMeasure

private void iniMeasure()

updateMeasure

private void updateMeasure()

isMeasure

private boolean isMeasure(RubikCell c)

updateLeaf

private void updateLeaf(javax.swing.tree.DefaultMutableTreeNode n)

createTableEmpty

private void createTableEmpty()

createTable

private void createTable(boolean isTableHead)

iniCellInAux

private int iniCellInAux(java.lang.Object[][] table,
                         int ir,
                         int ic,
                         RubikCell c)

printTable

private void printTable(java.lang.Object[][] table)

getColsCount

int getColsCount()
Returns:
Returns the colsCount.

getColsInHeader

int getColsInHeader()
Returns:
Returns the colsInHeader.

getIMeasure

int getIMeasure()
Returns:
Returns the iMeasure.

getNBody

javax.swing.tree.DefaultMutableTreeNode getNBody()
Returns:
Returns the nBody.

getNCorner

javax.swing.tree.DefaultMutableTreeNode getNCorner()
Returns:
Returns the nCorner.

getNHead

javax.swing.tree.DefaultMutableTreeNode getNHead()
Returns:
Returns the nHead.

getNMeasure

javax.swing.tree.DefaultMutableTreeNode getNMeasure()
Returns:
Returns the nMeasure.

getNTable

javax.swing.tree.DefaultMutableTreeNode getNTable()
Returns:
Returns the nTable.

isResultEmpty

boolean isResultEmpty()
Returns:
Returns the resultEmpty.

getRowsInBody

int getRowsInBody()
Returns:
Returns the rowsInBody.

getRowsInHeader

int getRowsInHeader()
Returns:
Returns the rowsInHeader.

getTableBody

java.lang.Object[][] getTableBody()
Returns:
Returns the tableBody.

getTableHead

java.lang.Object[][] getTableHead()
Returns:
Returns the tableHead.

getDimCount

int getDimCount()
Returns:
Returns the dimCount.

getColIniData

int getColIniData()
Returns:
Returns the colIniData.

isTableEmpty

boolean isTableEmpty()
Returns:
Returns the tableEmpty.

isAutoUpdate

public boolean isAutoUpdate()
Returns:
Returns the autoUpdate.

setAutoUpdate

public void setAutoUpdate(boolean autoUpdate)
Parameters:
autoUpdate - The autoUpdate to set.

modelChanged

public void modelChanged(com.tonbeller.jpivot.core.ModelChangeEvent arg0)
Specified by:
modelChanged in interface com.tonbeller.jpivot.core.ModelChangeListener

structureChanged

public void structureChanged(com.tonbeller.jpivot.core.ModelChangeEvent arg0)
Specified by:
structureChanged in interface com.tonbeller.jpivot.core.ModelChangeListener

confiSpan

private void confiSpan()

confiTableChanged

public void confiTableChanged()
Description copied from interface: ConfiTableListener
Informa de un cambio en la configuracion de la table

Specified by:
confiTableChanged in interface ConfiTableListener

JRubik v0.6

JRubik v0.6