com.jzy3d.surfedit.swing.sync
Class SurfEditTableSync

java.lang.Object
  extended by com.jzy3d.surfedit.swing.sync.SurfEditTableSync

public class SurfEditTableSync
extends Object

SurfEditTableSync maintains synchronization between a chart and a table. The chart key controller is registered both by the table and the chart. To avoid conflicts with the table key shortcuts (which uses arrow keys for changing the current cell selection), +/- on a surface cell z value should be achieved with k/j keys instead of arrow up/down. The table renderer directly uses the surface object to know selected cells and colormaps. When the chart's surface has a Z change, the table is updated. When the table has a cell value change, the chart's surface is updated. When a table cell is selected, it directly change the selection status of the surface.

Author:
Martin Pernollet

Field Summary
protected  CellSelectedEventListener cellSelectionListener
           
protected  InteractiveChart chart
           
protected  KeyListener chartPostListener
           
protected  SurfEditTableLayout layout
           
protected  boolean lockChartToTable
           
protected  boolean lockTableToChart
           
protected  Logger logger
           
protected  JTable table
           
protected  AbstractTableSelectionListener tableSelectionListener
           
protected  TableModelListener tableUpdateListener
           
protected static boolean USE_CHART_TO_TABLE_LOCKING
           
protected  ZChangedListener zChangedListener
           
 
Constructor Summary
SurfEditTableSync(InteractiveChart chart, SurfEditTable table)
           
 
Method Summary
static void configure(JTable table)
          Some settings required to have appropriate selection mode.
protected  void experimentalTableCellListener(SurfEditTable table)
           
 InteractiveChart getChart()
           
protected static AbstractTableModel getModel(JTable table)
           
protected static SurfEditTableRenderer getRenderer(JTable table)
           
 JTable getTable()
           
 SurfEditTableLayout getTableLayout()
           
 boolean isFlippedLayout()
           
 boolean isLockChartToTable()
           
 boolean isLockTableToChart()
           
 void unwire()
          To be called before changing the primary surface.
static SurfEditTableSync wire(InteractiveChart chart, SurfEditTable table)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chart

protected InteractiveChart chart

table

protected JTable table

layout

protected SurfEditTableLayout layout

chartPostListener

protected KeyListener chartPostListener

cellSelectionListener

protected CellSelectedEventListener cellSelectionListener

tableSelectionListener

protected AbstractTableSelectionListener tableSelectionListener

zChangedListener

protected ZChangedListener zChangedListener

tableUpdateListener

protected TableModelListener tableUpdateListener

lockChartToTable

protected boolean lockChartToTable

lockTableToChart

protected boolean lockTableToChart

logger

protected Logger logger

USE_CHART_TO_TABLE_LOCKING

protected static boolean USE_CHART_TO_TABLE_LOCKING
Constructor Detail

SurfEditTableSync

public SurfEditTableSync(InteractiveChart chart,
                         SurfEditTable table)
Method Detail

wire

public static SurfEditTableSync wire(InteractiveChart chart,
                                     SurfEditTable table)

unwire

public void unwire()
To be called before changing the primary surface.


experimentalTableCellListener

protected void experimentalTableCellListener(SurfEditTable table)

configure

public static void configure(JTable table)
Some settings required to have appropriate selection mode.


getRenderer

protected static SurfEditTableRenderer getRenderer(JTable table)

getModel

protected static AbstractTableModel getModel(JTable table)

getChart

public InteractiveChart getChart()

getTable

public JTable getTable()

getTableLayout

public SurfEditTableLayout getTableLayout()

isFlippedLayout

public boolean isFlippedLayout()

isLockChartToTable

public boolean isLockChartToTable()

isLockTableToChart

public boolean isLockTableToChart()


Copyright © 2014. All rights reserved.