[Japi-cvs] SF.net SVN: japi: [573] progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/ swing
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2007-08-12 16:44:55
|
Revision: 573 http://japi.svn.sourceforge.net/japi/?rev=573&view=rev Author: christianhujer Date: 2007-08-12 09:44:52 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Fixed some minor issues / warnings: Added missing javadoc tags. Added missing @Override annotations. Added missing @NotNull / @Nullable annotations. Added missing final modifiers. Modified Paths: -------------- libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkManager.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeTreeTableModel.java progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/gui/QuestionCollectionGUI.java progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/AbstractManager.java progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/recent/RecentURLsMenu.java progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/settings/SettingsPane.java Modified: libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkManager.java =================================================================== --- libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkManager.java 2007-08-12 11:45:43 UTC (rev 572) +++ libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkManager.java 2007-08-12 16:44:52 UTC (rev 573) @@ -306,7 +306,7 @@ /** {@inheritDoc} * @return title of this Bookmark */ - @NotNull public String toString() { + @Override @NotNull public String toString() { return title; } @@ -513,7 +513,7 @@ } /** {@inheritDoc} */ - public void store(final Node n) { + @Override public void store(final Node n) { final Element e = n.getOwnerDocument().createElement("bookmark"); e.setAttribute("title", getTitle()); e.setAttribute("href", getURL()); @@ -605,7 +605,7 @@ final int pos = bookmarks.size(); bookmarks.add(bookmark); bookmark.setFolder(this); - for (JMenu menu : menus) { + for (final JMenu menu : menus) { menu.insert(bookmark.createMenu(), pos); } try { @@ -627,7 +627,7 @@ } bookmark.setFolder(this); bookmarks.add(index, bookmark); - for (JMenu menu : menus) { + for (final JMenu menu : menus) { menu.insert(bookmark.createMenu(), index); } try { @@ -660,7 +660,7 @@ @Override public void remove(final int index) { final Bookmark bookmark = bookmarks.remove(index); bookmark.folder = null; - for (JMenu menu : menus) { + for (final JMenu menu : menus) { menu.remove(index); } } @@ -669,7 +669,7 @@ @Override public JMenu createMenu() { final JMenu menu = new JMenu(getTitle()); menu.setName(getTitle()); - for (Bookmark bookmark : bookmarks) { + for (final Bookmark bookmark : bookmarks) { if (bookmark instanceof BookmarkSeparator) { menu.addSeparator(); } else { @@ -719,7 +719,7 @@ */ public void setAddBookmarkEnabled(final boolean enabled) { addBookmark.setEnabled(enabled); - for (Bookmark folder : bookmarks) { + for (final Bookmark folder : bookmarks) { if (folder instanceof BookmarkFolder) { ((BookmarkFolder) folder).setAddBookmarkEnabled(enabled); } @@ -731,13 +731,13 @@ final Element e = (n instanceof Document ? (Document) n : n.getOwnerDocument()).createElement("bookmarks"); e.setAttribute("title", getTitle()); n.appendChild(e); - for (Bookmark bookmark : bookmarks) { + for (final Bookmark bookmark : bookmarks) { bookmark.store(e); } } /** {@inheritDoc} */ - public Enumeration<Bookmark> children() { + @Override public Enumeration<Bookmark> children() { return Collections.enumeration(bookmarks); } Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java 2007-08-12 11:45:43 UTC (rev 572) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java 2007-08-12 16:44:52 UTC (rev 573) @@ -102,7 +102,7 @@ /** Returns the action that is currently handled. * @return the action that is currently handled */ - public Action getAction() { + @Nullable public Action getAction() { return action; } Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeTreeTableModel.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeTreeTableModel.java 2007-08-12 11:45:43 UTC (rev 572) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeTreeTableModel.java 2007-08-12 16:44:52 UTC (rev 573) @@ -40,7 +40,9 @@ ACTION_BUILDER.getString("keystroke.table.column.keystroke.title"), }; - /** Create a KeyStrokeTreeTableModel. */ + /** Create a KeyStrokeTreeTableModel. + * @param builders ActionBuilders to create a KeyStrokeTreeTableModel for. + */ public KeyStrokeTreeTableModel(final List<ActionBuilder> builders) { super(new KeyStrokeRootNode(builders)); } Modified: progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/gui/QuestionCollectionGUI.java =================================================================== --- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/gui/QuestionCollectionGUI.java 2007-08-12 11:45:43 UTC (rev 572) +++ progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/gui/QuestionCollectionGUI.java 2007-08-12 16:44:52 UTC (rev 573) @@ -113,6 +113,7 @@ private Settings settings; /** Create a GUI for a Collection of Questions. + * @param settings Settings to use. */ public QuestionCollectionGUI(final Settings settings) { this.settings = settings; @@ -318,7 +319,7 @@ public JMenu createNavigationMenu() { final JMenu menu = new JMenu(res.getString("nav.text")); menu.setName(res.getString("nav.text")); - for (Action action : navigationActions) { + for (final Action action : navigationActions) { menu.add(new JMenuItem(action)); } menu.setMnemonic(VK_N); Modified: progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/AbstractManager.java =================================================================== --- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/AbstractManager.java 2007-08-12 11:45:43 UTC (rev 572) +++ progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/AbstractManager.java 2007-08-12 16:44:52 UTC (rev 573) @@ -146,6 +146,7 @@ /** Find the Action for an component. * @param comp component to find Action for + * @return SubAction for the specified comp. */ private SubAction<?> findActionFor(final T comp) { for (final SubAction<?> action : actions) { @@ -196,7 +197,8 @@ * Subclasses may override this method if they need extended SubActions. * When overriding, you may choose to call <code>super.createSubAction(comp)</code> and modify it or create a new one, perhaps for subclassing * SubAction. - * @param comp component to create SubAction for + * @param comp Component to create SubAction for. + * @return SubAction for the specified component. */ protected SubAction<T> createSubAction(final T comp) { return new SubAction<T>(comp); @@ -287,7 +289,9 @@ } } - /** Create a JCheckBoxMenuItem for this Action. */ + /** Create a JCheckBoxMenuItem for this Action. + * @return JCheckBoxMenuItem for this Action. + */ JCheckBoxMenuItem createCheckBoxMenuItem() { final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(this); buttons.add(new WeakReference<AbstractButton>(menuItem)); @@ -295,7 +299,9 @@ return menuItem; } - /** Create a JCheckBox for this Actin. */ + /** Create a JCheckBox for this Action. + * @return JCheckBox for this Action. + */ JCheckBox createCheckBox() { final JCheckBox checkBox = new JCheckBox(this); buttons.add(new WeakReference<AbstractButton>(checkBox)); Modified: progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/recent/RecentURLsMenu.java =================================================================== --- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/recent/RecentURLsMenu.java 2007-08-12 11:45:43 UTC (rev 572) +++ progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/recent/RecentURLsMenu.java 2007-08-12 16:44:52 UTC (rev 573) @@ -76,7 +76,7 @@ /** Update the menu. */ private void updateMenu() { removeAll(); - for (String url : recent.getRecentlyURLs()) { + for (final String url : recent.getRecentlyURLs()) { add(new JMenuItem(new URLAction(url))); } } @@ -98,7 +98,9 @@ /** The URL to be opened. */ private String url; - /** Create a URLAction. */ + /** Create a URLAction. + * @param url URL to use for this action. + */ URLAction(final String url) { putValue(NAME, url); this.url = url; Modified: progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/settings/SettingsPane.java =================================================================== --- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/settings/SettingsPane.java 2007-08-12 11:45:43 UTC (rev 572) +++ progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/settings/SettingsPane.java 2007-08-12 16:44:52 UTC (rev 573) @@ -96,7 +96,9 @@ /** The active module. */ private transient SettingsModule activeModule; - /** Create a SettingsPane. */ + /** Create a SettingsPane. + * @param modules SettingsModules to display. + */ public SettingsPane(final Collection<SettingsModule> modules) { this.modules.addAll(modules); settingsLayout = new CardLayout(); @@ -140,7 +142,9 @@ add(createButtonsPane(), gbc); } - /** Create the buttons pane. */ + /** Create the buttons pane. + * @return Newly created buttons pane. + */ private JComponent createButtonsPane() { final JPanel buttonsPane = new JPanel(); buttonsPane.setLayout(new GridBagLayout()); @@ -190,7 +194,7 @@ /** apply action. */ public void apply() { - for (SettingsModule module : modules) { + for (final SettingsModule module : modules) { module.apply(); } } @@ -199,8 +203,8 @@ public void cancel() { if (dialog != null) { dialog.setVisible(false); + dialog.dispose(); } - dialog.dispose(); dialog = null; if (rootFrame != null) { rootFrame.dispose(); @@ -248,7 +252,7 @@ * @param c Component to get Window for * @return Window for c */ - private static final Window getWindowForComponent(final Component c) { + private static Window getWindowForComponent(final Component c) { if (c == null) { return getRootFrame(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |