|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdatabionics.esom.tool.AbstractTool
databionics.esom.renderer.background.BackgroundTool
public class BackgroundTool
GUI-interface to manage the various backgrounds. Delivers a JPanel for the ControlPanel.
| Field Summary | |
|---|---|
protected javax.swing.JComboBox |
backgroundBox
Drop down list to choose backgrounds |
protected java.util.ArrayList |
backgroundList
A list containing the backgrounds. |
protected StringList |
backgroundNames
A list containing the names oft the backgrounds. |
protected java.text.NumberFormat |
df
Number format for parameters for some backgrounds. |
protected static org.apache.log4j.Logger |
log
interface to log4j system. |
protected LoadBMFileAction |
noBmCapture
This Action will load a *.bm into if the Background is missing one. |
protected LoadLrnFileAction |
noLrnCapture
This Action will load a *.lrn into if the Background is missing one. |
protected LoadWtsFileAction |
noWtsFileCapture
This Action will load a *.wts file if the Background is missing one. |
protected javax.swing.JPanel |
pnlBackgroundChooser
Panel containing the different GUI elements. |
| 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 | |
|---|---|
BackgroundTool(boolean gui,
Application application)
Standard Constructor. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Event handling for background GUI elements. |
protected java.lang.String |
fallback()
If for any reason a Background might not work, this can be called as a fallback on the UMatrix. |
void |
findBackgrounds(java.lang.String dir,
java.lang.String jar,
java.lang.String pkg,
java.lang.String sclass)
Finds classes that render backgrounds from *.jar file. |
BackgroundRenderer |
getActualRenderer()
workaround |
BackgroundRenderer |
getBackgroundByName(java.lang.String name)
Get a Background by its name. |
java.lang.String |
getShortTitle()
|
void |
init()
Find backgrounds automatically. |
void |
initGui(RenderPanel renderPanel,
BottomBar bottomBar)
Let the tool know the references to relevant GUI elements. |
void |
initRenderer()
Initialize the main renderer with the current settings. |
void |
keyPressed(java.awt.event.KeyEvent e)
donothing. |
void |
keyReleased(java.awt.event.KeyEvent e)
Event handling for edit fields. |
void |
keyTyped(java.awt.event.KeyEvent e)
donothing. |
void |
mouseClicked(java.awt.event.MouseEvent e)
donothing. |
void |
mouseEntered(java.awt.event.MouseEvent e)
donothing. |
void |
mouseExited(java.awt.event.MouseEvent e)
donothing. |
void |
mousePressed(java.awt.event.MouseEvent e)
donothing. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Event handling for the sliders. |
void |
reset()
Reset the Cache of all Backgrounds. |
void |
setLoader(ToolLoader loader)
|
void |
setUmxLoaded(boolean umx)
Set the flag if a height matrix (*.umx) but no Grid (*.wts) is loaded. |
protected boolean |
showBackground(java.lang.String name)
|
void |
update()
Updates the GUI elements dependent on the flag umxLoaded. |
| 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, 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, setDrawing, setFilename, setMoveCallback, setPolygonMode, setRenderer, setToolBar |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
protected java.util.ArrayList backgroundList
protected StringList backgroundNames
protected javax.swing.JComboBox backgroundBox
protected java.text.NumberFormat df
protected LoadLrnFileAction noLrnCapture
protected LoadBMFileAction noBmCapture
protected LoadWtsFileAction noWtsFileCapture
protected javax.swing.JPanel pnlBackgroundChooser
| Constructor Detail |
|---|
public BackgroundTool(boolean gui,
Application application)
gui - flag whether the tool is used from the GUIapplication - reference to the running application| Method Detail |
|---|
public void findBackgrounds(java.lang.String dir,
java.lang.String jar,
java.lang.String pkg,
java.lang.String sclass)
dir - directory to look in.jar - jar to look for.pkg - package to look in.sclass - superclass to find subclasses of.protected java.lang.String fallback()
public void initGui(RenderPanel renderPanel,
BottomBar bottomBar)
initGui in class AbstractToolcontrolPanel - ControlPanelrenderPanel - RenderPanelbottomBar - BottomBardatabionics.esom.tool.AbstractTool#initGui(databionics.esom.gui.ControlPanel,
databionics.esom.gui.RenderPanel, databionics.esom.gui.BottomBar)public void initRenderer()
public void init()
init in class AbstractToolpublic void reset()
reset in class AbstractToolpublic void update()
update in class AbstractToolpublic BackgroundRenderer getBackgroundByName(java.lang.String name)
name - the name of the background.
protected boolean showBackground(java.lang.String name)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class AbstractToole - an ActionEventpublic BackgroundRenderer getActualRenderer()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void setUmxLoaded(boolean umx)
umx - public java.lang.String getShortTitle()
getShortTitle in class AbstractToolpublic void setLoader(ToolLoader loader)
setLoader in class AbstractToolloader - The loader to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||