|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
adams.gui.core.BasePanel
adams.gui.tools.SpreadSheetViewerPanel
public class SpreadSheetViewerPanel
A panel for viewing SpreadSheet files.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
FILENAME
the name of the props file. |
protected Color |
m_BackgroundNegative
the custom background color for negative values (null if none set). |
protected Color |
m_BackgroundPositive
the custom background color for positive values (null if none set). |
protected SpreadSheetFileChooser |
m_FileChooser
the filedialog for loading CSV files. |
protected GenericObjectEditorDialog |
m_GOEColumnFinder
the dialog for column finders. |
protected GenericObjectEditorDialog |
m_GOEConversion
the dialog for spreadsheet conversions. |
protected GenericObjectEditorDialog |
m_GOERowFinder
the dialog for row finders. |
protected GenericObjectEditorDialog |
m_GOETransformer
the dialog for spreadsheet transformers. |
protected JMenuBar |
m_MenuBar
the menu bar, if used. |
protected JMenu |
m_MenuDataPlugins
the submenu for data plugins. |
protected JMenuItem |
m_MenuItemDataComputeDifference
the "compute difference" menu item. |
protected JMenuItem |
m_MenuItemDataConvert
the "Convert" menu item. |
protected JMenuItem |
m_MenuItemDataFilterColumns
the "filter columns" menu item. |
protected JMenuItem |
m_MenuItemDataFilterRows
the "filter rows" menu item. |
protected JMenuItem |
m_MenuItemDataSort
the "Sort" menu item. |
protected JMenuItem |
m_MenuItemDataTransform
the "Transform" menu item. |
protected JMenuItem |
m_MenuItemFileClose
the "close" menu item. |
protected JMenuItem |
m_MenuItemFileExit
the "exit" menu item. |
protected JMenuItem |
m_MenuItemFileOpen
the "open" menu item. |
protected JMenu |
m_MenuItemFileOpenRecent
the "load recent" submenu. |
protected JMenuItem |
m_MenuItemFileSaveAs
the "save as" menu item. |
protected JMenuItem |
m_MenuItemHelpFormulas
the "formuals" menu item. |
protected JCheckBoxMenuItem |
m_MenuItemViewApplyToAll
the "apply to all" menu item. |
protected JMenuItem |
m_MenuItemViewDisplayedDecimals
the "displayed decimals" menu item. |
protected JMenuItem |
m_MenuItemViewNegativeBackground
the "negative background" menu item. |
protected JMenuItem |
m_MenuItemViewPositiveBackground
the "positive background" menu item. |
protected JMenuItem |
m_MenuItemViewShowFormulas
the "show formulas" menu item. |
protected JMenu |
m_MenuViewPlugins
the submenu for view plugins. |
protected int |
m_NumDecimals
the number of decimals to display. |
protected static Properties |
m_Properties
the properties. |
protected RecentFilesHandler |
m_RecentFilesHandler
the recent files handler. |
protected TabbedPane |
m_TabbedPane
the tabbed pane for displaying the CSV files. |
static String |
SESSION_FILE
the file to store the recent files in. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
SpreadSheetViewerPanel()
|
|
| Method Summary | |
|---|---|
protected void |
close()
Closes the dialog or frame. |
protected void |
closeFile()
Closes the current active tab. |
protected void |
computeDifference()
Computes the difference between two sheets that the user selects and inserts it as new tab. |
protected void |
computeDifference(SpreadSheet sheet1,
SpreadSheet sheet2,
SpreadSheetColumnRange keyCols)
Computes the difference between the two sheets and inserts it as new tab. |
protected void |
convert()
Filters the spreadsheet using a conversion. |
protected SpreadSheetTable |
createTable(SpreadSheet sheet)
Creates and configures a spreadsheet table. |
protected void |
enterNumDecimals(boolean applyAll)
Alows the user to enter the number of decimals to display. |
protected void |
filterData(String oldTitle,
Object input,
AbstractActor filter)
Filters the data with the transformer and adds the generated output as new tab. |
protected void |
findColumns()
Filters the spreadsheet using a column finder. |
protected void |
findRows()
Filters the spreadsheet using a row finder. |
protected GenericObjectEditorDialog |
getColumnFinderDialog()
Returns the dialog for column finders. |
protected GenericObjectEditorDialog |
getConversionDialog()
Returns the dialog for conversion schemes. |
JMenuBar |
getMenuBar()
Creates a menu bar (singleton per panel object). |
static Properties |
getProperties()
Returns the properties that define the editor. |
protected GenericObjectEditorDialog |
getRowFinderDialog()
Returns the dialog for row finders. |
Class[] |
getSendToClasses()
Returns the classes that the supporter generates. |
Object |
getSendToItem(Class[] cls)
Returns the object to send. |
protected GenericObjectEditorDialog |
getTransformerDialog()
Returns the dialog for transformers. |
boolean |
hasSendToItem(Class[] cls)
Checks whether something to send is available. |
protected void |
initGUI()
Initializes the widgets. |
protected void |
initialize()
Initializes the members. |
void |
load(File file)
Loads the specified file. |
void |
load(SpreadSheetReader reader,
File file)
Loads the specified file. |
protected void |
open()
Opens one or more CSV files. |
protected void |
process(AbstractDataPlugin plugin)
Processes the current spreadsheet with the specified plugin. |
protected void |
saveAs()
Saves the current sheet. |
protected void |
selectBackground(boolean negative,
boolean applyAll)
Allows the user to select a background color for negative/positive values. |
protected void |
sort()
Shows a short dialog. |
protected void |
transform()
Filters the spreadsheet using the selected transformer. |
protected void |
updateMenu()
updates the enabled state of the menu items. |
protected void |
view(AbstractViewPlugin plugin)
Displays a dialog with the panel created by the plugin. |
void |
write(SpreadSheetWriter writer,
File file)
Saves the specified file. |
| Methods inherited from class adams.gui.core.BasePanel |
|---|
afterHide, afterShow, beforeHide, beforeShow, closeParent, finishInit, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, main, setParentTitle, setVisible |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String FILENAME
public static final String SESSION_FILE
protected static Properties m_Properties
protected TabbedPane m_TabbedPane
protected JMenuBar m_MenuBar
protected JMenuItem m_MenuItemFileOpen
protected JMenu m_MenuItemFileOpenRecent
protected JMenuItem m_MenuItemFileSaveAs
protected JMenuItem m_MenuItemFileClose
protected JMenuItem m_MenuItemFileExit
protected JMenuItem m_MenuItemDataFilterColumns
protected JMenuItem m_MenuItemDataFilterRows
protected JMenuItem m_MenuItemDataComputeDifference
protected JMenuItem m_MenuItemDataConvert
protected JMenuItem m_MenuItemDataTransform
protected JMenuItem m_MenuItemDataSort
protected JCheckBoxMenuItem m_MenuItemViewApplyToAll
protected JMenuItem m_MenuItemViewDisplayedDecimals
protected JMenuItem m_MenuItemViewNegativeBackground
protected JMenuItem m_MenuItemViewPositiveBackground
protected JMenuItem m_MenuItemViewShowFormulas
protected JMenu m_MenuDataPlugins
protected JMenu m_MenuViewPlugins
protected JMenuItem m_MenuItemHelpFormulas
protected SpreadSheetFileChooser m_FileChooser
protected RecentFilesHandler m_RecentFilesHandler
protected int m_NumDecimals
protected Color m_BackgroundNegative
protected Color m_BackgroundPositive
protected GenericObjectEditorDialog m_GOEColumnFinder
protected GenericObjectEditorDialog m_GOERowFinder
protected GenericObjectEditorDialog m_GOEConversion
protected GenericObjectEditorDialog m_GOETransformer
| Constructor Detail |
|---|
public SpreadSheetViewerPanel()
| Method Detail |
|---|
protected void initialize()
initialize in class BasePanelprotected void initGUI()
initGUI in class BasePanelpublic JMenuBar getMenuBar()
getMenuBar in interface MenuBarProviderprotected void enterNumDecimals(boolean applyAll)
applyAll - whether to apply the setting to all open tabs
protected void selectBackground(boolean negative,
boolean applyAll)
negative - whether to select negative or positive backgroundapplyAll - whether to apply background to all open tabsprotected void updateMenu()
protected void open()
public void load(File file)
file - the file to loadprotected SpreadSheetTable createTable(SpreadSheet sheet)
sheet - the sheet to display
public void load(SpreadSheetReader reader,
File file)
reader - the reader to use for reading the filefile - the file to load
public void write(SpreadSheetWriter writer,
File file)
writer - the writer to use for saving the filefile - the file to saveprotected void saveAs()
protected void closeFile()
protected void close()
public Class[] getSendToClasses()
getSendToClasses in interface SendToActionSupporterpublic boolean hasSendToItem(Class[] cls)
hasSendToItem in interface SendToActionSupportercls - the classes to retrieve the item for
public Object getSendToItem(Class[] cls)
getSendToItem in interface SendToActionSupportercls - the classes to retrieve the item for
protected GenericObjectEditorDialog getColumnFinderDialog()
protected GenericObjectEditorDialog getRowFinderDialog()
protected GenericObjectEditorDialog getConversionDialog()
protected GenericObjectEditorDialog getTransformerDialog()
protected void filterData(String oldTitle,
Object input,
AbstractActor filter)
oldTitle - the title from the old tabinput - the spreadsheet to processfilter - the transformerprotected void findColumns()
protected void findRows()
protected void convert()
protected void transform()
protected void computeDifference(SpreadSheet sheet1,
SpreadSheet sheet2,
SpreadSheetColumnRange keyCols)
protected void sort()
protected void computeDifference()
protected void process(AbstractDataPlugin plugin)
plugin - the plugin to useprotected void view(AbstractViewPlugin plugin)
plugin - for generating the viewpublic static Properties getProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||