/**
* The Swing user interface.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public class SwingInterface implements CoreListener, LoggingListener, PropertyChangeListener {
/**
* Creates a new swing interface.
- *
+ *
* @param core
* The core to operate on
* @param configDirectory
/**
* Returns the core that is controlled by the Swing interface.
- *
+ *
* @return The core
*/
Core getCore() {
/**
* Returns the main window of the Swing interface.
- *
+ *
* @return The main window
*/
MainWindow getMainWindow() {
/**
* Returns whether the advanced mode is activated.
- *
+ *
* @return <code>true</code> if the advanced mode is activated,
* <code>false</code> if the simple mode is activated
*/
/**
* Returns the “configure” action.
- *
+ *
* @return The “configure” action
*/
I18nAction getConfigureAction() {
/**
* Returns the “import config” action.
- *
+ *
* @return The “import config” action
*/
I18nAction getImportConfigAction() {
/**
* Returns the “quit” action.
- *
+ *
* @return The “quit” action
*/
I18nAction getQuitAction() {
/**
* Returns the “add node” action.
- *
+ *
* @return The “add node” action
*/
I18nAction getAddNodeAction() {
/**
* Returns the “connect to node” action for the given node.
- *
+ *
* @param node
* The node go get the “connect” action for
* @return The “connect to node” action
/**
* Returns the “disconnect from node” action for the given node.
- *
+ *
* @param node
* The node go get the “disconnect” action for
* @return The “disconnect from node” action
/**
* Returns the “edit node” action for the given node.
- *
+ *
* @param node
* The node to edit
* @return The “edit node” action
/**
* Returns the “delete node” action for the given node.
- *
+ *
* @param node
* The node to delete
* @return The “delete node” action
/**
* Returns all language actions.
- *
+ *
* @return All language actions
*/
List<I18nAction> getLanguageActions() {
/**
* Returns the “about” action.
- *
+ *
* @return The “about” action
*/
I18nAction getHelpAboutAction() {
/**
* Returns the “add project” action.
- *
+ *
* @return The “add project” action
*/
I18nAction getAddProjectAction() {
/**
* Returns the “clone project” action for the given project.
- *
+ *
* @param project
* The project to get the “clone project” action for
* @return The “clone project” action
/**
* Returns the “delete project” action for the given project.
- *
+ *
* @param project
* The project to get the “delete project” action for
* @return The “delete project” action
/**
* Returns all currently configured nodes.
- *
+ *
* @return All configured nodes
*/
List<Node> getNodes() {
/**
* Returns a list of all projects.
- *
+ *
* @return All projects
*/
List<Project> getProjects() {
/**
* Returns the thread pool used for off-thread processes.
- *
+ *
* @return The thread pool
*/
Executor getThreadPool() {
};
List<Locale> availableLanguages = I18n.findAvailableLanguages();
for (final Locale locale: availableLanguages) {
- I18nAction languageAction = new I18nAction("general.language." + locale.getLanguage()) {
+ I18nAction languageAction = new I18nAction("general.language." + locale.getLanguage(), IconLoader.loadIcon("/flag-" + locale.getLanguage() + ".png")) {
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent e) {
/**
* Edits the given node.
- *
+ *
* @param node
* The node to edit
*/
/**
* Deletes the given node.
- *
+ *
* @param node
* The node to delete
*/
/**
* Connects to the node.
- *
+ *
* @param node
* The node to connect to
*/
/**
* Disconnects from the node.
- *
+ *
* @param node
* The node to disconnect from
*/
/**
* Changes the language of the interface. This method also disables the
* action for the newly set language and enables all others.
- *
+ *
* @param newLocale
* The new language
* @param languageAction
/**
* Clones a project.
- *
+ *
* @param project
* The project to clone
*/
/**
* Deletes a project.
- *
+ *
* @param project
* The project to delete
*/