|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.MouseAdapter
net.sf.jaxodraw.gui.panel.JaxoTabbedCanvasPanel
public class JaxoTabbedCanvasPanel
A tabbed panel. This holds properties that are common for the whole application, eg the collection of tabs, the canvas (which is unique for all tabs), etc.
Constructor Summary | |
---|---|
JaxoTabbedCanvasPanel(JaxoCommunicator panel,
Component parent)
Constructor: adds MouseListener and ChangeListener to the tabbedPane. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
JaxoDrawingArea |
getCanvas()
Returns an instance of the canvas. |
JComponent |
getRoot()
Root component displaying current tabs and a way to switch between them. |
JaxoTab |
getSelectedTab()
Return the currently active tab. |
JaxoTab |
getTabAt(int index)
Returns the tab at given index. |
int |
getTabCount()
Gets the current number of tabs. |
int |
getTabIndex(JaxoTab t)
Get the index of the given tab. |
JaxoTab |
getTabWithSaveFileName(String name)
(An arbitrary) Tab with the given saveFileName, or 'null' if none exists. |
boolean |
isAntialiasEnabled()
Indicates whether antialiasing is active or not. |
void |
mousePressed(MouseEvent e)
Processes the right-click to show the popup menu on the canvas tab. |
void |
openOrImport(String fileName)
Open given file (JaxoDraw or plugin based on extension) in a new tab. |
void |
performAction(int mode)
Performs the action corresponding to the given mode. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
setAntialiasEnabled(boolean on)
Switches antialiasing on or off. |
void |
setSelectedTab(JaxoTab value)
Sets the given tab as currently selected. |
void |
updateLanguage()
Updates the component with the current language as set in the preferences ( JaxoPrefs.PREF_LANGUAGE ). |
Methods inherited from class java.awt.event.MouseAdapter |
---|
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, mouseWheelMoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JaxoTabbedCanvasPanel(JaxoCommunicator panel, Component parent)
panel
- Instance of the main panelparent
- the parent component of this panel.Method Detail |
---|
public JaxoDrawingArea getCanvas()
public final JComponent getRoot()
public final int getTabCount()
public final JaxoTab getTabAt(int index)
index
- The index of tab to get.
public int getTabIndex(JaxoTab t)
t
- The tab.
public final JaxoTab getSelectedTab()
public void setSelectedTab(JaxoTab value)
value
- True for selected.public final JaxoTab getTabWithSaveFileName(String name)
name
- The save file name of the tab.
public final void updateLanguage()
JaxoPrefs.PREF_LANGUAGE
).
updateLanguage
in interface JaxoLocalized
public void performAction(int mode)
mode
- A mode as defined in JaxoConstants
.public void openOrImport(String fileName)
fileName
- The file to open or import.public final void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class MouseAdapter
e
- The mouse event.public boolean isAntialiasEnabled()
public void setAntialiasEnabled(boolean on)
on
- A boolean variable that indicates whether antialising is on or not.public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- the ActionEvent.public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |