public class MainGui
extends java.lang.Object
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener
Modifier and Type | Class and Description |
---|---|
class |
MainGui.TabComponentNoBorder
This class prevents borders from being painted.
|
Modifier and Type | Field and Description |
---|---|
GuiListener |
guiListener |
Constructor and Description |
---|
MainGui() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent arg0)
the common implementation, where actionEvents are handled
|
void |
activateQuickloadLinks(boolean activate)
(De)Activates all quickload links.
|
void |
addGuiListener(GuiListener listener)
Adds the GuiListener, that is needed to invoke Actions in the parent class
of this gui
|
void |
addMembraneViewListener(MembraneViewListener listener)
adds the MembraneViewListener, that is needed to invoke Actions in the parent class
of this gui
|
void |
addQuickloadLink(java.io.File file)
Adds a quickloadlink to the filemenu.
|
void |
addView(java.lang.String name,
javax.swing.ImageIcon icon,
javax.swing.JComponent compo)
* Adds a JComponent to the Gui
|
void |
addView(java.lang.String name,
javax.swing.JComponent compo)
Adds a JComponent to the Gui
|
void |
enableGenerateButton(boolean b)
En or disables the generate options
|
void |
enableMembraneButtons(boolean bool)
en- or disable some mebrane options.
|
void |
enableSaveButtons(boolean bool)
en- or disable the option to save the membrane
|
void |
focusView(int index)
Focus the view specified by its index and brings it on top if covered.
|
void |
generateGui()
builds up the gui with all added views
|
javax.swing.JFrame |
getFrame()
Returns the Frame
|
javax.swing.JCheckBox |
getStereoEnable() |
javax.swing.JSlider |
getStereoSlider() |
javax.swing.JLabel |
getStereoSliderPosition() |
java.lang.String |
getTooltip(int which)
For a better overview, the Tooltips are defined in this method and they
can be accessed by their index
|
void |
initilizeBorderlessLayout()
Initialize the borderless Layout, required especially for the StereoView.
|
static boolean |
isDark() |
boolean |
isEnabled() |
boolean |
isMaximized(int view)
Tests whether the passed view is maximized or not
|
void |
maximizeView(int i)
maximizes the specified view
|
void |
restoreLayout()
trying to retrieve the layout here from the layout file.
|
void |
restoreView(int i)
Restores the specified view
|
static void |
setBrightLookAndFeel() |
static void |
setDarkLookAndFeel() |
void |
setDefaultTitle(java.lang.String defaultTitle)
sets the default Title for the MainFrame
|
void |
setEnabled(boolean b)
En-or disables all toolbar and menubar buttons
|
void |
setLayoutFile(java.io.File file)
set the location of the layout file.
|
void |
setMainFrameTitle(java.lang.String title)
sets the specified String as the Mainframe's Title.
|
void |
setStereoEnable(javax.swing.JCheckBox stereoEnable) |
void |
setStereoSliderPosition(javax.swing.JLabel stereoSliderPosition) |
static void |
setupAnalyzeMembraneButton() |
void |
showBordersAndTitles(boolean bool)
Switches visibility of borders and titles on or off
|
void |
showToolbar(boolean bool)
Switches visibility of the toolbar on or off
|
void |
stateChanged(javax.swing.event.ChangeEvent e) |
void |
toggleAllTitlesAndBorders(boolean showTitles)
Hide or show all titles and borders.
|
public GuiListener guiListener
public javax.swing.JCheckBox getStereoEnable()
public void setStereoEnable(javax.swing.JCheckBox stereoEnable)
public javax.swing.JLabel getStereoSliderPosition()
public void setStereoSliderPosition(javax.swing.JLabel stereoSliderPosition)
public javax.swing.JSlider getStereoSlider()
public void addView(java.lang.String name, javax.swing.JComponent compo)
name
- - the title for the component's windowcompo
- - the component to addpublic void addView(java.lang.String name, javax.swing.ImageIcon icon, javax.swing.JComponent compo)
name
- - the title for the component's windowcompo
- - the component to addicon
- - a icon to add to the windowbarpublic void generateGui()
public void focusView(int index)
the
- index of the viewpublic void restoreLayout()
public void showToolbar(boolean bool)
bool
- - det wether or not the toolbar should be visiblepublic void showBordersAndTitles(boolean bool)
bool
- - det wether or not the toolbar should be visiblepublic void setLayoutFile(java.io.File file)
file
- public void enableSaveButtons(boolean bool)
bool
- public void enableMembraneButtons(boolean bool)
bool
- public void addGuiListener(GuiListener listener)
listener
- public void addMembraneViewListener(MembraneViewListener listener)
listener
- public java.lang.String getTooltip(int which)
which
- - number of the requested tooltippublic void actionPerformed(java.awt.event.ActionEvent arg0)
actionPerformed
in interface java.awt.event.ActionListener
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
public void addQuickloadLink(java.io.File file)
file
- public void activateQuickloadLinks(boolean activate)
boolean
- activatepublic javax.swing.JFrame getFrame()
public void setMainFrameTitle(java.lang.String title)
title
- public void setDefaultTitle(java.lang.String defaultTitle)
defaultTitle
- public boolean isMaximized(int view)
view
- public void enableGenerateButton(boolean b)
b
- public void setEnabled(boolean b)
b
- public void maximizeView(int i)
i
- public void restoreView(int i)
i
- public static boolean isDark()
public static void setDarkLookAndFeel()
public static void setBrightLookAndFeel()
public static void setupAnalyzeMembraneButton()
public void initilizeBorderlessLayout()
public void toggleAllTitlesAndBorders(boolean showTitles)
public boolean isEnabled()