Class BrolTableMouseAdapter
java.lang.Object
java.awt.event.MouseAdapter
be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,PropertyChangeListener
,EventListener
MouseAdapter to add a contextual menu on the broldev tables
to allow features like exporting, ...
Provided by the broldev.core.swing project.
- Since:
- 1.0 (Jul 06, 2008), broldev.core.swing 0.0.1-SNAPSHOT dependency
- Version:
- 1.1 (Feb 8 2009)
- Author:
- Steph GAUDRY
-
Constructor Summary
ConstructorDescriptionBrolTableMouseAdapter(org.jdesktop.swingx.JXTable table)
Builds an instance and adds a minimum contextual menu to a tableBrolTableMouseAdapter(org.jdesktop.swingx.JXTable table, JMenu menu)
Builds an instance and adds a custom contextual menu to a tableBrolTableMouseAdapter(org.jdesktop.swingx.JXTable table, JMenu menu, String exportDocumentTitle)
Builds an instance and adds a custom contextual menu to a table -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMenuComponents(Component[] menuComponents)
Adds somecomponents
to the table default menu.void
addMenuComponents(JMenu menu)
Adds some features to the table default menu.be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.ClearAction
be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.ExportAction
Returns an action to export table datagetMenu()
Returns the contextual menu which may be the minimal menu, or custombe.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.PrintAction
Returns an action to print table datagetTitle()
void
void
void
void
setClearAction(be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.ClearAction clearAction)
void
setExportAction(be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.ExportAction exportAction)
protected void
void
setPrintAction(be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.PrintAction printAction)
void
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved
-
Constructor Details
-
BrolTableMouseAdapter
public BrolTableMouseAdapter(org.jdesktop.swingx.JXTable table)Builds an instance and adds a minimum contextual menu to a table- Parameters:
table
- JXTable to customize
-
BrolTableMouseAdapter
Builds an instance and adds a custom contextual menu to a table- Parameters:
table
- JXTable to customizemenu
- menu to add to the table contextual menu. All parts of the new menu are moved into the existing menu. May start with aJXTitledSeparator
to show specific actions.
-
BrolTableMouseAdapter
public BrolTableMouseAdapter(org.jdesktop.swingx.JXTable table, JMenu menu, String exportDocumentTitle)Builds an instance and adds a custom contextual menu to a table- Parameters:
table
- JXTable to customizemenu
- menu to add to the table contextual menu. All parts of the new menu are moved into the existing menu. May start with aJXTitledSeparator
to show specific actions.exportDocumentTitle
- String given to the export option dialog to purpose an output document title.
-
-
Method Details
-
addMenuComponents
Adds some features to the table default menu. All theMenuComponents
will be added to the existing menu.- Parameters:
menu
-JMenu
containing the new components to add- Since:
- 1.1 (Feb 8, 2009)
-
addMenuComponents
Adds somecomponents
to the table default menu.- Parameters:
menuComponents
- new components to add- Since:
- 1.1 (Feb 8, 2009)
-
getMenu
Returns the contextual menu which may be the minimal menu, or custom- Returns:
- the menu
- See Also:
addMenuComponents(JMenu)
-
getExportAction
public be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.ExportAction getExportAction()Returns an action to export table data- Returns:
- the exportAction
-
setExportAction
public void setExportAction(be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.ExportAction exportAction)- Parameters:
exportAction
- the action to set- See Also:
getExportAction()
-
getPrintAction
public be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.PrintAction getPrintAction()Returns an action to print table data- Returns:
- the printAction
-
setPrintAction
public void setPrintAction(be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.PrintAction printAction)- Parameters:
printAction
- the printAction to set
-
getClearAction
public be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.ClearAction getClearAction()- Returns:
- the clearAction
-
setClearAction
public void setClearAction(be.gaudry.swing.component.table.listeners.BrolTableMouseAdapter.ClearAction clearAction)- Parameters:
clearAction
- the clearAction to set
-
getTitle
- Returns:
- the title of
the document to export
-
setTitle
- Parameters:
title
- the title ofthe document to export
to set
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapter
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classMouseAdapter
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
setLanguage
protected void setLanguage()
-