|
|||||||||
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
ikayaki.gui.ProjectComponent
ikayaki.gui.ProjectExplorerPanel
public class ProjectExplorerPanel
Creates a history/autocomplete field (browserField) for choosing the project directory, a listing of project files in that directory (explorerTable) and in that listing a line for creating new project, which has a textbox for project name, an AF/TH ComboBox and a "Create new" button (createNewProjectButton) for actuating the creation. Also has a right-click popup menu for exporting project files.
Nested Class Summary | |
---|---|
private class |
ProjectExplorerPanel.NewProjectPanel
Panel with components for creating a new project. |
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.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
private LastExecutor |
autocompleteExecutor
LastExecutor for scheduling autocomplete results to separate thread (disk access and displaying). |
private JButton |
browseButton
|
private JPanel |
browsePanel
Holds browserField and browseButton |
private JComboBox |
browserField
Text field for writing directory to change to. |
private JTextField |
browserFieldEditor
|
private ComponentFlasher |
browserFieldFlasher
|
(package private) boolean |
browserFieldPopupIsAutocomplete
Tells whether current popup menu is autocomplete list (and not directory history). |
private FittedComboBoxRenderer |
browserFieldRenderer
|
(package private) boolean |
browserFieldUpdatingPopup
Tells whether browserField's popup menu list is being updated, and we don't want those ActionEvents. |
private File |
directory
Currently open directory. |
private ProjectExplorerTable |
explorerTable
|
private JScrollPane |
explorerTableScrollPane
|
private ProjectExplorerPanel.NewProjectPanel |
newProjectPanel
|
private ProjectComponent |
parent
The component (MainViewPanel) whose setProject() method will be called on opening a new project file. |
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 | |
---|---|
ProjectExplorerPanel(ProjectComponent parent)
Call next constructor... |
|
ProjectExplorerPanel(ProjectComponent parent,
Project project)
Creates all components, sets directory as the last open directory or opened project's directory, initializes files with files from that directory. |
Method Summary | |
---|---|
private void |
doAutoComplete()
Updates autocomplete popup-menu. |
private File[] |
getAutocompleteFiles(String dirmatch)
Reads matching directories from given directory name's parent. |
private File[] |
getDirectoryHistory()
Reads current directory history from Settings. |
private void |
setBrowserFieldCursorToEnd()
Deprecated. not needed anymore; cursor seems to be there anyway? |
private void |
setBrowserFieldPopup(File[] files,
boolean uniformFit)
Sets browserField popup-menu-list as given files; also clears any selection. |
private boolean |
setDirectory(File directory)
Attempts to change to the given directory. |
void |
setProject(Project project)
Call super.setProject(project), highlight selected project, or unhighlight unselected project. |
Methods inherited from class ikayaki.gui.ProjectComponent |
---|
getParentFrame, getProject, measurementUpdated, projectUpdated |
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 |
---|
private final ProjectComponent parent
private final JPanel browsePanel
private final JComboBox browserField
private final FittedComboBoxRenderer browserFieldRenderer
private final JTextField browserFieldEditor
private final ComponentFlasher browserFieldFlasher
boolean browserFieldPopupIsAutocomplete
boolean browserFieldUpdatingPopup
private final JButton browseButton
private final ProjectExplorerTable explorerTable
private final JScrollPane explorerTableScrollPane
private ProjectExplorerPanel.NewProjectPanel newProjectPanel
private final LastExecutor autocompleteExecutor
private File directory
Constructor Detail |
---|
public ProjectExplorerPanel(ProjectComponent parent)
parent
- the component whose setProject() method will be called on opening a new project file.public ProjectExplorerPanel(ProjectComponent parent, Project project)
parent
- the component whose setProject() method will be called on opening a new project file.project
- project to load and whose directory to set as current directory.Method Detail |
---|
public void setProject(Project project)
setProject
in class ProjectComponent
project
- project opened, or null to open no project.private boolean setDirectory(File directory)
directory
- directory to change to.
private File[] getDirectoryHistory()
private File[] getAutocompleteFiles(String dirmatch)
dirmatch
- beginning of directory to which match the directories in its parent directory...
private void doAutoComplete()
private void setBrowserFieldPopup(File[] files, boolean uniformFit)
files
- list of files to set the list to.uniformFit
- true if all the file paths should be cut short from the same directory, false otherwise.private void setBrowserFieldCursorToEnd()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |