databionics.esom.tool.island
Class IslandTool

java.lang.Object
  extended by databionics.esom.tool.AbstractTool
      extended by databionics.esom.tool.island.IslandTool
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class IslandTool
extends AbstractTool

Author:
stammi

Field Summary
protected  javax.swing.JCheckBox cbxDrawOverlap
           
protected  javax.swing.JCheckBox cbxDrawTransparent
           
protected  java.awt.Color clrFourtimes
           
protected  java.awt.Color clrThreetimes
           
protected  java.awt.Color clrTwice
           
protected  java.awt.Color clrWater
           
protected  java.awt.Color clrZeros
           
protected  cern.colt.matrix.DoubleMatrix2D data
           
protected  int fourtimes
           
protected static org.apache.log4j.Logger log
          interface to log4j system
protected  int once
           
protected  cern.colt.matrix.DoubleMatrix2D overlapMatrix
           
protected  boolean overlapMode
           
protected  int threetimes
           
protected  boolean transparentMode
           
protected  int twice
           
protected  int water
           
protected  int zeros
           
 
Fields inherited from class databionics.esom.tool.AbstractTool
application, bottomBar, bottomTab, btnClear, btnLoad, btnPaint, btnSave, clearItm, clickMode, controlButton, creatorPanel, dataTable, dataTableModel, displayPanel, dragMode, drawing, fileMenu, filename, gui, loader, loadItm, moveCallback, pnlControl, polygonMode, popMenu, removeItm, renderer, renderPanel, saveItm, toolBar, toolRenderer
 
Constructor Summary
IslandTool(boolean gui, Application application)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          If the big ControlButton is pressed, select this Tool also the draw/undrawbutton is handled here.
 void createIslandOverlapMatrix()
           
protected  cern.colt.matrix.DoubleMatrix2D createIslandOverlapMatrix(cern.colt.matrix.DoubleMatrix2D islandMatrix)
           
 java.awt.Color getClrFourtimes()
           
 java.awt.Color getClrThreetimes()
           
 java.awt.Color getClrTwice()
           
 java.awt.Color getClrWater()
           
 java.awt.Color getClrZeros()
           
 cern.colt.matrix.DoubleMatrix2D getData()
           
 int getFourtimes()
           
 int getOnce()
           
 cern.colt.matrix.DoubleMatrix2D getOverlapMatrix()
           
 java.lang.String getShortTitle()
           
 int getThreetimes()
           
 int getTwice()
           
 int getWater()
           
 java.awt.Color getWaterColor(int x, int y)
           
 int getZeros()
           
 void init()
          Initialize what needs to be Initialized.
 boolean isOverlapMode()
           
 boolean isXYSelectableTiled(int x, int y)
           
 boolean load(java.lang.String filename)
           
 void reset()
          reset the tool.
 boolean save(java.lang.String filename)
           
 void setClrFourtimes(java.awt.Color clrFourtimes)
           
 void setClrThreetimes(java.awt.Color clrThreetimes)
           
 void setClrTwice(java.awt.Color clrTwice)
           
 void setClrWater(java.awt.Color clrWater)
           
 void setClrZeros(java.awt.Color clrZeros)
           
 void setData(java.lang.Object object)
           
 void setDrawing(boolean drawing)
          set the drawing mode for this tool.
 void setOverlapMode(boolean overlapMode)
           
 void update()
          Updates all gui elements, if not null.
 
Methods inherited from class databionics.esom.tool.AbstractTool
callback, getApplication, getBottomTab, getCallback, getControlButton, getCreatorPanel, getDataTable, getDataTableModel, getDisplayPanel, getFileMenu, getFilename, getLoader, getMessage, getMoveCallback, getPnlControl, getPopMenu, getRenderer, getToolBar, getToolRenderer, initGui, isClickMode, isDragMode, isDrawing, isGui, isPolygonMode, moveSelection, reAreas, reColorize, reDraw, reFore, reMask, rePostFore, rePreFore, reRender, reTile, reZoom, select, setApplication, setBottomTab, setCallback, setClickMode, setControlButton, setCreatorPanel, setCtrlAccelerator, setDataTable, setDataTableModel, setDisplayPanel, setDragMode, setFilename, setLoader, setMoveCallback, setPolygonMode, setRenderer, setToolBar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
interface to log4j system


cbxDrawOverlap

protected javax.swing.JCheckBox cbxDrawOverlap

cbxDrawTransparent

protected javax.swing.JCheckBox cbxDrawTransparent

data

protected cern.colt.matrix.DoubleMatrix2D data

overlapMatrix

protected cern.colt.matrix.DoubleMatrix2D overlapMatrix

overlapMode

protected boolean overlapMode

transparentMode

protected boolean transparentMode

zeros

protected int zeros

once

protected int once

twice

protected int twice

threetimes

protected int threetimes

fourtimes

protected int fourtimes

water

protected int water

clrZeros

protected java.awt.Color clrZeros

clrTwice

protected java.awt.Color clrTwice

clrThreetimes

protected java.awt.Color clrThreetimes

clrFourtimes

protected java.awt.Color clrFourtimes

clrWater

protected java.awt.Color clrWater
Constructor Detail

IslandTool

public IslandTool(boolean gui,
                  Application application)
Method Detail

init

public void init()
Description copied from class: AbstractTool
Initialize what needs to be Initialized.

Specified by:
init in class AbstractTool

reset

public void reset()
Description copied from class: AbstractTool
reset the tool.

Specified by:
reset in class AbstractTool

update

public void update()
Description copied from class: AbstractTool
Updates all gui elements, if not null. Uses JComponent.revalidate() Better solution maybe possible.

Overrides:
update in class AbstractTool

load

public boolean load(java.lang.String filename)

save

public boolean save(java.lang.String filename)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: AbstractTool
If the big ControlButton is pressed, select this Tool also the draw/undrawbutton is handled here. Implementors should call super.actionperformed at the end of their actionPerformed method. if not, be shure, you want this behaviour.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class AbstractTool
Parameters:
e - an ActionEvent

setData

public void setData(java.lang.Object object)

getData

public cern.colt.matrix.DoubleMatrix2D getData()

getWaterColor

public java.awt.Color getWaterColor(int x,
                                    int y)

createIslandOverlapMatrix

public void createIslandOverlapMatrix()

createIslandOverlapMatrix

protected cern.colt.matrix.DoubleMatrix2D createIslandOverlapMatrix(cern.colt.matrix.DoubleMatrix2D islandMatrix)

isOverlapMode

public boolean isOverlapMode()
Returns:
Returns the overlapMode.

setOverlapMode

public void setOverlapMode(boolean overlapMode)
Parameters:
overlapMode - The overlapMode to set.

getShortTitle

public java.lang.String getShortTitle()
Specified by:
getShortTitle in class AbstractTool

setDrawing

public void setDrawing(boolean drawing)
Description copied from class: AbstractTool
set the drawing mode for this tool. if it changes, reDraw() will be called.

Overrides:
setDrawing in class AbstractTool
Parameters:
drawing - The drawing to set.

getOverlapMatrix

public cern.colt.matrix.DoubleMatrix2D getOverlapMatrix()
Returns:
Returns the overlapMatrix.

getFourtimes

public int getFourtimes()
Returns:
Returns the fourtimes.

getOnce

public int getOnce()
Returns:
Returns the once.

getThreetimes

public int getThreetimes()
Returns:
Returns the threetimes.

getTwice

public int getTwice()
Returns:
Returns the twice.

getWater

public int getWater()
Returns:
Returns the water.

getZeros

public int getZeros()
Returns:
Returns the zeros.

getClrFourtimes

public java.awt.Color getClrFourtimes()
Returns:
Returns the clrFourtimes.

setClrFourtimes

public void setClrFourtimes(java.awt.Color clrFourtimes)
Parameters:
clrFourtimes - The clrFourtimes to set.

getClrThreetimes

public java.awt.Color getClrThreetimes()
Returns:
Returns the clrThreetimes.

setClrThreetimes

public void setClrThreetimes(java.awt.Color clrThreetimes)
Parameters:
clrThreetimes - The clrThreetimes to set.

getClrTwice

public java.awt.Color getClrTwice()
Returns:
Returns the clrTwice.

setClrTwice

public void setClrTwice(java.awt.Color clrTwice)
Parameters:
clrTwice - The clrTwice to set.

getClrWater

public java.awt.Color getClrWater()
Returns:
Returns the clrWater.

setClrWater

public void setClrWater(java.awt.Color clrWater)
Parameters:
clrWater - The clrWater to set.

getClrZeros

public java.awt.Color getClrZeros()
Returns:
Returns the clrZeros.

setClrZeros

public void setClrZeros(java.awt.Color clrZeros)
Parameters:
clrZeros - The clrZeros to set.

isXYSelectableTiled

public boolean isXYSelectableTiled(int x,
                                   int y)
Parameters:
x -
y -
Returns:


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.