|
|||||||||
| Home >> All >> org >> chordcast >> [ ui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.chordcast.ui
Class ChordFrame

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.chordcast.ui.ChordFrame
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.MenuContainer, java.awt.event.MouseListener, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants, java.awt.event.WindowListener
- public class ChordFrame
- extends javax.swing.JFrame
- implements java.awt.event.WindowListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.KeyListener
- extends javax.swing.JFrame
Main frame of the Application "ChordCast".
| Nested Class Summary | |
(package private) class |
ChordFrame.PopupHandler
|
(package private) class |
ChordFrame.PopupListener
|
private class |
ChordFrame.ToolBarListener
|
| Nested classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
| Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Window |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ChordFrame()
Initialize the main frame and show it. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent actionEvent)
Handle events for buttons and menu items, among others. |
void |
addChordToSheet()
Add a Chord to the Current ChordSheet |
private void |
addRecentFile(org.chordcast.data.ChordSheet sheet)
|
void |
addSheet()
Add a new empty ChordSheet |
void |
addSheet(org.chordcast.data.ChordSheet sheet)
Add a new ChordSheet |
void |
cloneSheet()
Clone the Current ChordSheet and add the clone at the last position |
void |
copy()
Copy the Selected Chords of the Current ChordSheet into the Buffer. |
void |
cut()
Cut the Selected Chords of the Current ChordSheet and put they into the Buffer. |
void |
delChordOfSheet()
Delete all selected Chords in the Current ChordSheet |
org.chordcast.data.ChordSheet |
getCurrentSheet()
Return a link to the Current ChordSheet |
java.io.File |
getDefaultDirectory()
Get the default directory in which the file chooser open. |
java.awt.Color |
getDisplayColor()
Get the Color in which the chord will be show in ChordCast. |
private java.net.URL |
getImageURL(java.lang.String filename)
Retreive the Location of the specified file |
private int |
getLastSheetIndex()
|
java.lang.String |
getLookAndFeel()
Return the class name of the current look 'n feel |
private int |
getPositionInRecentFiles(org.chordcast.data.ChordSheet sheet)
|
java.awt.Color |
getPrintingColor()
Get the Color in which the chord will be print. |
private void |
initializeCursors()
|
private void |
initializeMenus()
|
private void |
initializeToolBars()
|
void |
itemStateChanged(java.awt.event.ItemEvent itemEvent)
This method is called when an item's state is changed. |
void |
keyPressed(java.awt.event.KeyEvent keyEvent)
This method is called when a key is pressed. |
void |
keyReleased(java.awt.event.KeyEvent keyEvent)
This method is called when a key is released. |
void |
keyTyped(java.awt.event.KeyEvent keyEvent)
This method is called when a key is typed. |
void |
load()
Load one or many ChordSheet from disk |
void |
load(java.lang.String url)
Load a ChordSheet from disk |
private void |
loadOptions()
|
void |
mouseClicked(java.awt.event.MouseEvent e)
This method is called when the mouse is clicked (pressed and released in short succession) on a component. |
void |
mouseEntered(java.awt.event.MouseEvent e)
This method is called when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e)
This method is called when the mouse exits a component. |
void |
mousePressed(java.awt.event.MouseEvent e)
This method is called when the mouse is pressed over a component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
This method is called when the mouse is released over a component. |
void |
paste()
Paste the Chords in the Buffer at the end of the Current ChordSheet |
void |
printSheet(boolean isSelectionPrint)
Print the current sheet. |
void |
reloadTitle()
Reload the title of the last ChordSheet on screen |
void |
reloadTitle(int n)
Reload the title of the ChordSheet at position n, on screen |
void |
removeCurrentSheet()
Remove the Current ChordSheet |
void |
removeSheets()
Remove all the ChordSheets loaded |
void |
save()
Save a ChordSheet on disk in a XCS format |
void |
saveAll()
Save all the open ChordSheets in a XCS format |
void |
saveAs()
Save a ChordSheet on disk in a XCS format |
void |
saveAsHtml()
Save a ChordSheet on disk in a HTML format |
private void |
saveOptions()
Save the chordcast options |
void |
selectAllChords()
Set all the Chords of the current ChordSheet to the state Selected |
void |
selectNoChords()
Set all the Chords of the current ChordSheet to the state unSelected |
void |
setChordsColors()
Change the color of the chords |
void |
setCurrentSheet(int index)
Set the focus on the ChordSheet at a specified index. |
void |
setDefaultDirectory(java.io.File dir)
Set the default directory in which the file chooser open. |
void |
setDisplayColor(java.awt.Color c)
Set the Color in which the chord will be show in ChordCast. |
void |
setLookAndFeel(java.lang.String lafClassName)
Set the lookAndFeel. |
private void |
setMenuBarState()
|
void |
setPrintingColor(java.awt.Color c)
Set the Color in which the chord will be print. |
void |
sortByName(boolean increase)
Sort all the Chords of the Current ChordSheet by their name. |
void |
swapChords(int i,
int j)
Swap the Chord at position i with the Chord at position j. |
void |
windowActivated(java.awt.event.WindowEvent evt)
This method is called when a window is activated. |
void |
windowClosed(java.awt.event.WindowEvent evt)
This method is called when the window is closed. |
void |
windowClosing(java.awt.event.WindowEvent evt)
Close the Application |
void |
windowDeactivated(java.awt.event.WindowEvent evt)
This method is called when the window is deactivated. |
void |
windowDeiconified(java.awt.event.WindowEvent evt)
This method is called when the window is deiconified. |
void |
windowIconified(java.awt.event.WindowEvent evt)
This method is called when the window is iconified. |
void |
windowOpened(java.awt.event.WindowEvent evt)
This method is called when the window is made visible. |
| Methods inherited from class java.awt.Frame |
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Field Detail |
menuBar
private javax.swing.JMenuBar menuBar
menuFile
private javax.swing.JMenu menuFile
menuSheet
private javax.swing.JMenu menuSheet
menuView
private javax.swing.JMenu menuView
menuHelp
private javax.swing.JMenu menuHelp
menuFileNew
private javax.swing.JMenuItem menuFileNew
menuFileOpen
private javax.swing.JMenuItem menuFileOpen
menuFileSave
private javax.swing.JMenuItem menuFileSave
menuFileSaveAs
private javax.swing.JMenuItem menuFileSaveAs
menuFileSaveAll
private javax.swing.JMenuItem menuFileSaveAll
menuFileClose
private javax.swing.JMenuItem menuFileClose
menuFileCloseAll
private javax.swing.JMenuItem menuFileCloseAll
menuFileExit
private javax.swing.JMenuItem menuFileExit
menuFilePrint
private javax.swing.JMenuItem menuFilePrint
menuFilePageSetup
private javax.swing.JMenuItem menuFilePageSetup
menuFileConfiguration
private javax.swing.JMenuItem menuFileConfiguration
menuFilePrintSelection
private javax.swing.JMenuItem menuFilePrintSelection
menuFileRecent
private javax.swing.JMenu menuFileRecent
menuFileExport
private javax.swing.JMenu menuFileExport
menuFileExportHTML
private javax.swing.JMenuItem menuFileExportHTML
menuSheetAdd
private javax.swing.JMenuItem menuSheetAdd
menuSheetDelete
private javax.swing.JMenuItem menuSheetDelete
menuSheetSelectAll
private javax.swing.JMenuItem menuSheetSelectAll
menuSheetEdit
private javax.swing.JMenuItem menuSheetEdit
menuSheetDuplicate
private javax.swing.JMenuItem menuSheetDuplicate
menuSheetCopy
private javax.swing.JMenuItem menuSheetCopy
menuSheetCut
private javax.swing.JMenuItem menuSheetCut
menuSheetPaste
private javax.swing.JMenuItem menuSheetPaste
menuSheetSelectNone
private javax.swing.JMenuItem menuSheetSelectNone
menuSheetSortAZ
private javax.swing.JMenuItem menuSheetSortAZ
menuSheetSortZA
private javax.swing.JMenuItem menuSheetSortZA
menuSheetExportSelection
private javax.swing.JMenuItem menuSheetExportSelection
menuSheetProperties
private javax.swing.JMenuItem menuSheetProperties
menuViewZoomIn
private javax.swing.JMenuItem menuViewZoomIn
menuViewZoomOut
private javax.swing.JMenuItem menuViewZoomOut
menuViewZoom
private javax.swing.JMenu menuViewZoom
menuViewZoomVeryBig
private javax.swing.JMenuItem menuViewZoomVeryBig
menuViewZoomBig
private javax.swing.JMenuItem menuViewZoomBig
menuViewZoomNormal
private javax.swing.JMenuItem menuViewZoomNormal
menuViewZoomSmall
private javax.swing.JMenuItem menuViewZoomSmall
menuViewZoomVerySmall
private javax.swing.JMenuItem menuViewZoomVerySmall
menuHelpContents
private javax.swing.JMenuItem menuHelpContents
menuHelpAbout
private javax.swing.JMenuItem menuHelpAbout
tabbedPane
private javax.swing.JTabbedPane tabbedPane
scrollPane
private javax.swing.JScrollPane scrollPane
fileToolBar
private javax.swing.JToolBar fileToolBar
newFileButton
private javax.swing.JButton newFileButton
openFileButton
private javax.swing.JButton openFileButton
saveFileButton
private javax.swing.JButton saveFileButton
printFileButton
private javax.swing.JButton printFileButton
sheetToolBar
private javax.swing.JToolBar sheetToolBar
newChordButton
private javax.swing.JButton newChordButton
delChordButton
private javax.swing.JButton delChordButton
editButton
private javax.swing.JButton editButton
infoButton
private javax.swing.JButton infoButton
editToolBar
private javax.swing.JToolBar editToolBar
copyButton
private javax.swing.JButton copyButton
cutButton
private javax.swing.JButton cutButton
pasteButton
private javax.swing.JButton pasteButton
c
private final java.awt.Container c
chordSheetVector
private final java.util.Vector chordSheetVector
element
private java.lang.Byte element
chordBuffer
private final org.chordcast.data.ChordSheet chordBuffer
loaderSaver
private final org.chordcast.io.ChordSheetIO loaderSaver
fileChooser
private final org.chordcast.io.ChordSheetFileChooser fileChooser
printingColor
private java.awt.Color printingColor
displayColor
private java.awt.Color displayColor
defaultDirectory
private java.io.File defaultDirectory
recentFilesMax
private int recentFilesMax
properties
private final java.util.Properties properties
configFile
private final java.io.File configFile
addSheetItem
private javax.swing.JMenuItem addSheetItem
editSheetItem
private javax.swing.JMenuItem editSheetItem
closeSheetItem
private javax.swing.JMenuItem closeSheetItem
closeAllSheetItem
private javax.swing.JMenuItem closeAllSheetItem
currentLaf
private java.lang.String currentLaf
popupMenu
private javax.swing.JPopupMenu popupMenu
popupHandler
private ChordFrame.PopupHandler popupHandler
popupListener
private ChordFrame.PopupListener popupListener
| Constructor Detail |
ChordFrame
public ChordFrame()
- Initialize the main frame and show it.
| Method Detail |
getImageURL
private java.net.URL getImageURL(java.lang.String filename)
- Retreive the Location of the specified file
setLookAndFeel
public void setLookAndFeel(java.lang.String lafClassName)
- Set the lookAndFeel.
The frame will be updated automatically to show the new LAF
getLookAndFeel
public java.lang.String getLookAndFeel()
- Return the class name of the current look 'n feel
initializeCursors
private void initializeCursors()
loadOptions
private void loadOptions()
saveOptions
private void saveOptions()
- Save the chordcast options
getDefaultDirectory
public java.io.File getDefaultDirectory()
- Get the default directory in which the file chooser open.
setDefaultDirectory
public void setDefaultDirectory(java.io.File dir)
- Set the default directory in which the file chooser open.
If the directory is null of is not a directory the
user home directory is set.
getPrintingColor
public java.awt.Color getPrintingColor()
- Get the Color in which the chord will be print.
setPrintingColor
public void setPrintingColor(java.awt.Color c)
- Set the Color in which the chord will be print.
getDisplayColor
public java.awt.Color getDisplayColor()
- Get the Color in which the chord will be show in ChordCast.
setDisplayColor
public void setDisplayColor(java.awt.Color c)
- Set the Color in which the chord will be show in ChordCast.
reloadTitle
public void reloadTitle()
- Reload the title of the last ChordSheet on screen
reloadTitle
public void reloadTitle(int n)
- Reload the title of the ChordSheet at position n, on screen
cut
public void cut()
- Cut the Selected Chords of the Current ChordSheet
and put they into the Buffer.
copy
public void copy()
- Copy the Selected Chords of the Current ChordSheet
into the Buffer.
paste
public void paste()
- Paste the Chords in the Buffer at the end of the Current ChordSheet
addSheet
public void addSheet()
- Add a new empty ChordSheet
addSheet
public void addSheet(org.chordcast.data.ChordSheet sheet)
- Add a new ChordSheet
getLastSheetIndex
private int getLastSheetIndex()
addChordToSheet
public void addChordToSheet()
- Add a Chord to the Current ChordSheet
delChordOfSheet
public void delChordOfSheet()
- Delete all selected Chords in the Current ChordSheet
removeCurrentSheet
public void removeCurrentSheet()
- Remove the Current ChordSheet
removeSheets
public void removeSheets()
- Remove all the ChordSheets loaded
selectAllChords
public void selectAllChords()
- Set all the Chords of the current ChordSheet to the state Selected
selectNoChords
public void selectNoChords()
- Set all the Chords of the current ChordSheet to the state unSelected
getCurrentSheet
public org.chordcast.data.ChordSheet getCurrentSheet()
- Return a link to the Current ChordSheet
setCurrentSheet
public void setCurrentSheet(int index)
- Set the focus on the ChordSheet at a specified index.
load
public void load()
- Load one or many ChordSheet from disk
load
public void load(java.lang.String url)
- Load a ChordSheet from disk
save
public void save()
- Save a ChordSheet on disk in a XCS format
getPositionInRecentFiles
private int getPositionInRecentFiles(org.chordcast.data.ChordSheet sheet)
addRecentFile
private void addRecentFile(org.chordcast.data.ChordSheet sheet)
saveAs
public void saveAs()
- Save a ChordSheet on disk in a XCS format
saveAll
public void saveAll()
- Save all the open ChordSheets in a XCS format
saveAsHtml
public void saveAsHtml()
- Save a ChordSheet on disk in a HTML format
sortByName
public void sortByName(boolean increase)
- Sort all the Chords of the Current ChordSheet by their name.
swapChords
public void swapChords(int i,
int j)
- Swap the Chord at position i with the Chord at position j.
The first position is 0
cloneSheet
public void cloneSheet()
- Clone the Current ChordSheet and add the clone at the last position
setChordsColors
public void setChordsColors()
- Change the color of the chords
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
- Handle events for buttons and menu items, among others.
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
JAVADOC