Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ikayaki.gui.ProjectExplorerPanel Class Reference

Inheritance diagram for ikayaki.gui.ProjectExplorerPanel:

Inheritance graph
[legend]
Collaboration diagram for ikayaki.gui.ProjectExplorerPanel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ProjectExplorerPanel (ProjectComponent parent)
 ProjectExplorerPanel (ProjectComponent parent, Project project)
void setProject (Project project)

Package Attributes

boolean browserFieldPopupIsAutocomplete = false
boolean browserFieldUpdatingPopup = false

Private Member Functions

boolean setDirectory (File directory)
File[] getDirectoryHistory ()
File[] getAutocompleteFiles (String dirmatch)
void doAutoComplete ()
void setBrowserFieldPopup (File[] files, boolean uniformFit)
void setBrowserFieldCursorToEnd ()

Private Attributes

final ProjectComponent parent
final JPanel browsePanel = new JPanel()
final JComboBox browserField
final FittedComboBoxRenderer browserFieldRenderer
final JTextField browserFieldEditor
final ComponentFlasher browserFieldFlasher
final JButton browseButton
final ProjectExplorerTable explorerTable
final JScrollPane explorerTableScrollPane
NewProjectPanel newProjectPanel
final LastExecutor autocompleteExecutor = new LastExecutor(100, true)
File directory = null

Classes

class  NewProjectPanel

Detailed Description

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.

Author:
Samuli Kaipiainen

Definition at line 50 of file ProjectExplorerPanel.java.


Constructor & Destructor Documentation

ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel ProjectComponent  parent  ) 
 

Call next constructor...

Parameters:
parent the component whose setProject() method will be called on opening a new project file.

Definition at line 108 of file ProjectExplorerPanel.java.

References ikayaki.gui.null.

ikayaki.gui.ProjectExplorerPanel.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.

Parameters:
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.

Event D: On browseButton click - open a FileChooser dialog for choosing new directory, set it to directory, update files listing, update explorerTable and browserField.

Event C: On browserField popup window click - set clicked line as directory, update files listing, update explorerTable and browserField.

Event B: On browserField down-arrow-click - show directory history in browserField's popup window.

Event A: On browserField change - send autocomplete-results-finder with browserField's text to LastExecutor via autocompleteExecutor.execute(Runnable), which schedules disk access and displaying autocomplete results in browserField's popup window.

Definition at line 119 of file ProjectExplorerPanel.java.

References ikayaki.gui.ProjectExplorerPanel.browseButton, ikayaki.gui.ProjectExplorerPanel.browsePanel, ikayaki.gui.ProjectExplorerPanel.browserField, ikayaki.gui.ProjectExplorerPanel.browserFieldEditor, ikayaki.gui.ProjectExplorerPanel.browserFieldFlasher, ikayaki.gui.ProjectExplorerPanel.browserFieldRenderer, ikayaki.gui.ProjectExplorerPanel.directory, ikayaki.gui.ProjectExplorerPanel.explorerTable, ikayaki.gui.ProjectExplorerPanel.explorerTableScrollPane, ikayaki.gui.ProjectExplorerPanel.getDirectoryHistory(), ikayaki.Project.getFile(), ikayaki.gui.ProjectExplorerPanel.newProjectPanel, ikayaki.gui.null, ikayaki.gui.project, and ikayaki.gui.ProjectExplorerPanel.setDirectory().

Here is the call graph for this function:


Member Function Documentation

void ikayaki.gui.ProjectExplorerPanel.doAutoComplete  )  [private]
 

Updates autocomplete popup-menu.

Definition at line 372 of file ProjectExplorerPanel.java.

File [] ikayaki.gui.ProjectExplorerPanel.getAutocompleteFiles String  dirmatch  )  [private]
 

Reads matching directories from given directory name's parent.

Parameters:
dirmatch beginning of directory to which match the directories in its parent directory...
Returns:
matching directories.

Definition at line 346 of file ProjectExplorerPanel.java.

References ikayaki.Project.getName(), and ikayaki.gui.null.

Here is the call graph for this function:

File [] ikayaki.gui.ProjectExplorerPanel.getDirectoryHistory  )  [private]
 

Reads current directory history from Settings.

Returns:
current directory history. Should never return null.

Definition at line 336 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

void ikayaki.gui.ProjectExplorerPanel.setBrowserFieldCursorToEnd  )  [private]
 

Sets browserField's cursor to text field's (right) end.

Deprecated:
not needed anymore; cursor seems to be there anyway?

Definition at line 431 of file ProjectExplorerPanel.java.

void ikayaki.gui.ProjectExplorerPanel.setBrowserFieldPopup File[]  files,
boolean  uniformFit
[private]
 

Sets browserField popup-menu-list as given files; also clears any selection.

Parameters:
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.

Definition at line 396 of file ProjectExplorerPanel.java.

boolean ikayaki.gui.ProjectExplorerPanel.setDirectory File  directory  )  [private]
 

Attempts to change to the given directory. Updates browserField and explorerTable with new directory.

Parameters:
directory directory to change to.
Returns:
true if succesful, false otherwise.

Definition at line 319 of file ProjectExplorerPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

void ikayaki.gui.ProjectExplorerPanel.setProject Project  project  ) 
 

Call super.setProject(project), highlight selected project, or unhighlight unselected project.

Parameters:
project project opened, or null to open no project.

Reimplemented from ikayaki.gui.ProjectComponent.

Definition at line 295 of file ProjectExplorerPanel.java.

References ikayaki.Project.addProjectListener(), ikayaki.Project.getFile(), ikayaki.Project.getType(), ikayaki.gui.null, and ikayaki.gui.project.

Here is the call graph for this function:


Member Data Documentation

final LastExecutor ikayaki.gui.ProjectExplorerPanel.autocompleteExecutor = new LastExecutor(100, true) [private]
 

LastExecutor for scheduling autocomplete results to separate thread (disk access and displaying).

Definition at line 96 of file ProjectExplorerPanel.java.

final JButton ikayaki.gui.ProjectExplorerPanel.browseButton [private]
 

Definition at line 86 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

final JPanel ikayaki.gui.ProjectExplorerPanel.browsePanel = new JPanel() [private]
 

Holds browserField and browseButton

Definition at line 59 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

final JComboBox ikayaki.gui.ProjectExplorerPanel.browserField [private]
 

Text field for writing directory to change to. Autocomplete results appear to Combo Box' popup window, scheduled by LastExecutor. Directory history appears to the same popup window when the down-arrow right to text field is clicked.

Definition at line 66 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

final JTextField ikayaki.gui.ProjectExplorerPanel.browserFieldEditor [private]
 

Definition at line 68 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

final ComponentFlasher ikayaki.gui.ProjectExplorerPanel.browserFieldFlasher [private]
 

Definition at line 69 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

boolean ikayaki.gui.ProjectExplorerPanel.browserFieldPopupIsAutocomplete = false [package]
 

Tells whether current popup menu is autocomplete list (and not directory history).

Definition at line 74 of file ProjectExplorerPanel.java.

final FittedComboBoxRenderer ikayaki.gui.ProjectExplorerPanel.browserFieldRenderer [private]
 

Definition at line 67 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

boolean ikayaki.gui.ProjectExplorerPanel.browserFieldUpdatingPopup = false [package]
 

Tells whether browserField's popup menu list is being updated, and we don't want those ActionEvents.

Definition at line 84 of file ProjectExplorerPanel.java.

File ikayaki.gui.ProjectExplorerPanel.directory = null [private]
 

Currently open directory.

Definition at line 101 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

final ProjectExplorerTable ikayaki.gui.ProjectExplorerPanel.explorerTable [private]
 

Definition at line 88 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

final JScrollPane ikayaki.gui.ProjectExplorerPanel.explorerTableScrollPane [private]
 

Definition at line 89 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

NewProjectPanel ikayaki.gui.ProjectExplorerPanel.newProjectPanel [private]
 

Definition at line 91 of file ProjectExplorerPanel.java.

Referenced by ikayaki.gui.ProjectExplorerPanel.ProjectExplorerPanel().

final ProjectComponent ikayaki.gui.ProjectExplorerPanel.parent [private]
 

The component (MainViewPanel) whose setProject() method will be called on opening a new project file.

Definition at line 54 of file ProjectExplorerPanel.java.


The documentation for this class was generated from the following file:
Generated on Fri May 6 16:01:08 2005 for Squid by  doxygen 1.4.1