japi-cvs Mailing List for JAPI (Page 44)
Status: Beta
Brought to you by:
christianhujer
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(115) |
May
(11) |
Jun
(5) |
Jul
(2) |
Aug
(10) |
Sep
(35) |
Oct
(14) |
Nov
(49) |
Dec
(27) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(57) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(25) |
Jun
(134) |
Jul
(76) |
Aug
(34) |
Sep
(27) |
Oct
(5) |
Nov
|
Dec
(1) |
2008 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(63) |
Nov
(30) |
Dec
(43) |
2009 |
Jan
(10) |
Feb
(420) |
Mar
(67) |
Apr
(3) |
May
(61) |
Jun
(21) |
Jul
(19) |
Aug
|
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(7) |
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: <chr...@us...> - 2007-05-12 14:56:53
|
Revision: 333 http://svn.sourceforge.net/japi/?rev=333&view=rev Author: christianhujer Date: 2007-05-12 07:56:50 -0700 (Sat, 12 May 2007) Log Message: ----------- Modified JEduca to incorporate recent JAPI changes. Modified Paths: -------------- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/Main.java progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/gui/ReviewGUI.java progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/recent/RecentURLsMenu.java Modified: progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/Main.java =================================================================== --- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/Main.java 2007-05-12 14:56:27 UTC (rev 332) +++ progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/Main.java 2007-05-12 14:56:50 UTC (rev 333) @@ -29,6 +29,7 @@ /** Main program. * @param args command line arguments + * @throws Throwable in case of problems starting the program. */ public static void main(final String... args) throws Throwable { new ProgramFrame(new Program()); Modified: progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/gui/ReviewGUI.java =================================================================== --- progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/gui/ReviewGUI.java 2007-05-12 14:56:27 UTC (rev 332) +++ progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/jtest/gui/ReviewGUI.java 2007-05-12 14:56:50 UTC (rev 333) @@ -33,7 +33,7 @@ import javax.swing.event.ChangeListener; import net.sf.japi.progs.jeduca.jtest.QuestionCollection; import net.sf.japi.progs.jeduca.jtest.QuestionText; -import net.sf.japi.swing.ColumnLayout; +import net.sf.japi.swing.VerticalFlowLayout; /** Graphical user interface for displaying a review page for all questions. * @author $Author: chris $ @@ -68,7 +68,7 @@ public ReviewGUI(final QuestionCollectionGUI questionCollectionGUI) { this.questionCollectionGUI = questionCollectionGUI; setLayout(new BorderLayout()); - reviews = new JPanel(new ColumnLayout()); + reviews = new JPanel(new VerticalFlowLayout()); add(reviews); } 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-05-12 14:56:27 UTC (rev 332) +++ progs/jeduca/trunk/src/net/sf/japi/progs/jeduca/swing/recent/RecentURLsMenu.java 2007-05-12 14:56:50 UTC (rev 333) @@ -25,7 +25,7 @@ import javax.swing.JMenu; import javax.swing.JMenuItem; import net.sf.japi.swing.ActionFactory; -import net.sf.japi.swing.io.CanLoad; +import net.sf.japi.swing.app.CanLoad; /** Class for a menu showing the recently used URLs. * @todo think about serialization of recent and program This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-12 14:56:28
|
Revision: 332 http://svn.sourceforge.net/japi/?rev=332&view=rev Author: christianhujer Date: 2007-05-12 07:56:27 -0700 (Sat, 12 May 2007) Log Message: ----------- Added missing historic classes to JEduca. Added Paths: ----------- progs/jeduca/trunk/src/net/sf/japi/swing/ progs/jeduca/trunk/src/net/sf/japi/swing/LookAndFeelManager.java Copied: progs/jeduca/trunk/src/net/sf/japi/swing/LookAndFeelManager.java (from rev 328, historic/trunk/src/app/net/sf/japi/swing/LookAndFeelManager.java) =================================================================== --- progs/jeduca/trunk/src/net/sf/japi/swing/LookAndFeelManager.java (rev 0) +++ progs/jeduca/trunk/src/net/sf/japi/swing/LookAndFeelManager.java 2007-05-12 14:56:27 UTC (rev 332) @@ -0,0 +1,214 @@ +/* JAPI - (Yet another (hopefully) useful) Java API + * + * Copyright (C) 2004-2006 Christian Hujer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +package net.sf.japi.swing; + +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.AbstractAction; +import javax.swing.ButtonGroup; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JRadioButtonMenuItem; +import javax.swing.UIManager; +import static javax.swing.SwingUtilities.updateComponentTreeUI; +import static javax.swing.UIManager.getInstalledLookAndFeels; +import static javax.swing.UIManager.getLookAndFeel; +import static javax.swing.UIManager.installLookAndFeel; +import static javax.swing.UIManager.setLookAndFeel; + +/** A class that manages look and feel and provides a corresponding menu. + * If you want your frames and dialogs to be default look and feel decorated, you currently must invoke the corresponding method {@link + * #setDefaultLookAndFeelDecorated(boolean)} before creating any instances of JFrame or JDialog. + * @todo find a method to update the isDefaultLookAndFeelDecorated state of Frames. + * @todo perhaps this class should be more a component manager than just a LookAndFeelManager? + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public final class LookAndFeelManager { + + /** The Root Component(s) for which to update the look and feel. */ + private final List<Component> roots = new ArrayList<Component>(); + + /** Action for look and feel decoration change. */ + private final LAFDecoAction lafDecoAction = new LAFDecoAction(); + + static { + try { + installLookAndFeel("Windows", "net.sf.japi.swing.WindowsLookAndFeel"); + } catch (final Exception e) { + Logger.getLogger("net.sf.japi").log(Level.INFO, "lafUnavailable", e); + } + JFrame.setDefaultLookAndFeelDecorated(true); + JDialog.setDefaultLookAndFeelDecorated(true); + } + + /** Create a LookAndFeelManager. */ + public LookAndFeelManager() { + } + + /** Add a Component to the roots. + * @param comp Component to add to the roots + */ + public void add(final Component comp) { + if (comp != null && !roots.contains(comp)) { + roots.add(comp); + } + } + + /** Provide a menu which allows the user to choose from installed look and feels. + * @return menu with selectable look and feels + */ + public JMenu createMenu() { + return fillMenu(new JMenu(ActionFactory.getFactory("net.sf.japi.swing").createAction(true, "laf"))); + } + + /** Fill a menu with look and feel selection items. + * @param menu Menu to fill + * @return menu for convenience + */ + public JMenu fillMenu(final JMenu menu) { + final String active = getLookAndFeel().getClass().getName(); + final ButtonGroup bg = new ButtonGroup(); + for (final UIManager.LookAndFeelInfo lafInfo : getInstalledLookAndFeels()) { + final JRadioButtonMenuItem mi = new JRadioButtonMenuItem(new LAFAction(lafInfo)); // TODO: Cache LAFActions + if (lafInfo.getClassName().equals(active)) { + mi.setSelected(true); + } + bg.add(mi); + menu.add(mi); + } + menu.add(lafDecoAction.createJCheckBoxMenuItem()); + return menu; + } + + /** Remove a Component to the roots. + * @param comp Component to remove from the roots + */ + public void remove(final Component comp) { + roots.remove(comp); + } + + /** Set whether JFrames and JDialogs should use the default look and feel decoration. + * Also updates all JFrames and JDialogs managed. + * @param defaultLookAndFeelDecorated <code>true</code> for decoration from default look and feel, <code>false</code> for decoration from os + * @see JFrame#setDefaultLookAndFeelDecorated(boolean) + * @see JDialog#setDefaultLookAndFeelDecorated(boolean) + */ + public void setDefaultLookAndFeelDecorated(final boolean defaultLookAndFeelDecorated) { + JFrame.setDefaultLookAndFeelDecorated(defaultLookAndFeelDecorated); + JDialog.setDefaultLookAndFeelDecorated(defaultLookAndFeelDecorated); + for (final Component comp : roots) { + if (comp instanceof JFrame || comp instanceof JDialog) { + updateComponentTreeUI(comp); + } + } + } + + /** LookAndFeel Change Action. + * @author $Author: christianhujer $ + * @version $Id: LookAndFeelManager.java,v 1.8 2006/03/13 00:34:51 christianhujer Exp $ + */ + private final class LAFAction extends AbstractAction { + + /** Serial Version. */ + @SuppressWarnings({"AnalyzingVariableNaming"}) + private static final long serialVersionUID = 1L; + + /** Class name of look and feel. + * @serial include + */ + private final String className; + + /** Create a LAFAction. + * @param lafInfo LookAndFeelInfo + */ + LAFAction(final UIManager.LookAndFeelInfo lafInfo) { + putValue(NAME, lafInfo.getName()); + className = lafInfo.getClassName(); + } + + /** {@inheritDoc} */ + public void actionPerformed(final ActionEvent e) { + //noinspection CatchGenericClass,OverlyBroadCatchBlock + try { + setLookAndFeel(className); + for (final Component comp : roots) { + updateComponentTreeUI(comp); + } + } catch (final Exception ex) { + System.err.println(ex); + } + } + + /** {@inheritDoc} */ + @Override protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + } // class LAFAction + + /** LookAndFeelDecoration Action. */ + private final class LAFDecoAction extends AbstractAction { + + /** Serial Version. */ + @SuppressWarnings({"AnalyzingVariableNaming"}) + private static final long serialVersionUID = 1L; + + /** The list of JMenuItems created for this Action. */ + private final List<JCheckBoxMenuItem> menuItems = new ArrayList<JCheckBoxMenuItem>(); + + /** {@inheritDoc} */ + public void actionPerformed(final ActionEvent e) { + setDefaultLookAndFeelDecorated(!JFrame.isDefaultLookAndFeelDecorated()); + } + + /** Set the default look and feel decoration state. + * @param defaultLookAndFeelDecorated <code>true</code> if default look and feel decorated, otherwise <code>false</code> + */ + private void setDefaultLookAndFeelDecorated(final boolean defaultLookAndFeelDecorated) { + LookAndFeelManager.this.setDefaultLookAndFeelDecorated(defaultLookAndFeelDecorated); + for (final JCheckBoxMenuItem menuItem : menuItems) { + menuItem.setSelected(defaultLookAndFeelDecorated); + } + } + + /** Create a JCheckBoxMenuItem. + * @return JCHeckBoxMenuItem for the associated look and feel + */ + public JCheckBoxMenuItem createJCheckBoxMenuItem() { + final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(this); + menuItems.add(menuItem); + return menuItem; + } + + /** {@inheritDoc} */ + @Override protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + } // class LAFDecoAction + +} // class LookAndFeelManager This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-12 14:56:14
|
Revision: 331 http://svn.sourceforge.net/japi/?rev=331&view=rev Author: christianhujer Date: 2007-05-12 07:56:12 -0700 (Sat, 12 May 2007) Log Message: ----------- Added ToolBarLayout to extlib. Added Paths: ----------- libs/swing-extlib/trunk/src/net/sf/japi/swing/ToolBarLayout.java Copied: libs/swing-extlib/trunk/src/net/sf/japi/swing/ToolBarLayout.java (from rev 328, historic/trunk/src/app/net/sf/japi/swing/ToolBarLayout.java) =================================================================== --- libs/swing-extlib/trunk/src/net/sf/japi/swing/ToolBarLayout.java (rev 0) +++ libs/swing-extlib/trunk/src/net/sf/japi/swing/ToolBarLayout.java 2007-05-12 14:56:12 UTC (rev 331) @@ -0,0 +1,423 @@ +/* JAPI - (Yet another (hopefully) useful) Java API + * + * Copyright (C) 2004-2006 Christian Hujer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +package net.sf.japi.swing; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Insets; +import java.io.Serializable; +import static java.lang.Math.max; +import java.util.ArrayList; +import java.util.List; +import javax.swing.JToolBar; + +/** A LayoutManager that manages a layout of a {@link Container} similar to {@link BorderLayout} but with an important difference, it is possible to + * add as many components to a side layout region as you want. The desired purpose is to serve as LayoutManager for containers that shall contain + * toolbars. So this is a LayoutManager you always were looking for. + * <p /> + * Technically, this class is not a 100% replacement for {@link BorderLayout}. {@link JToolBar}'s UI ({@link + * javax.swing.plaf.basic.BasicToolBarUI}) directly looks for some features of the class {@link BorderLayout}, and if it is not {@link BorderLayout}, + * it uses some defaults. + * This class has been developed to make these defaults work as good as possible. + * Though this class doesn't technically replace {@link BorderLayout} - neither is this class a subclass of {@link BorderLayout} nor does it provide + * <em>all</em> methods {@link BorderLayout} does - it still does practically. + * <p /> + * The constant values {@link #NORTH}, {@link #SOUTH}, {@link #EAST}, {@link #WEST} and {@link #CENTER} are references to those of {@link + * BorderLayout}. + * The behaviour of {@link #CENTER} is that of {@link BorderLayout}: only one component can be added, subsequently added components overried all + * previously added. + * <p /> + * The behaviour of {@link #NORTH}, {@link #SOUTH}, {@link #EAST} and {@link #WEST} differs from {@link BorderLayout}. The position and layout + * behaviour is the same, with the slight difference that this LayoutManager is able to manage more than on single component in these four regions. + * Subsequently added components are placed from the outer to the inner. The first added component is the outmost component of that region, the last + * added component is the innermost component of that region. To place a component to the innermost level, simply add it to the same region again. + * <p /> + * Placing a component another level than the innermost of its destination region is currently not supported but might well be supported in future. + * <p /> + * There are four possible ways of specifying a constraint: + * <ul> + * <li>Use the geographical region constants from {@link BorderLayout}</li> + * <li>Use the geographical region constraints from this class</li> + * <li>Use an instance of {@link ToolBarConstraints}</li> + * <li>Use an enum region constraint from {@link ToolBarConstraints.Region}</li> + * </ul> + * . The constraint may be one of the String constants from this class or {@link BorderLayout} or it may + * be a {@link ToolBarConstraints}. + * @todo support rtl containers the same way as {@link BorderLayout} does it. + * @todo test {@link ToolBarConstraints} and {@link ToolBarConstraints.Region} + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @see BorderLayout + * @see JToolBar + */ +@SuppressWarnings({"NonPrivateFieldAccessedInSynchronizedContext", "FieldAccessedSynchronizedAndUnsynchronized"}) +public class ToolBarLayout extends BorderLayout { + + /** Serial Version. */ + @SuppressWarnings({"AnalyzingVariableNaming"}) + private static final long serialVersionUID = 1L; + + /** Horizontal Gap. + * @serial include + */ + private int hgap; + + /** Vertical Gap. + * @serial include + */ + private int vgap; + + /** Components in the north region. + * @serial include + */ + private List<Component> north = new ArrayList<Component>(); + + /** Components in the south region. + * @serial include + */ + private List<Component> south = new ArrayList<Component>(); + + /** Components in the east region. + * @serial include + */ + private List<Component> east = new ArrayList<Component>(); + + /** Components in the west region. + * @serial include + */ + private List<Component> west = new ArrayList<Component>(); + + /** Component in the center region. + * @serial include + */ + private Component center; + + /** Create a ToolBarLayout with zero gaps. */ + public ToolBarLayout() { + this(0, 0); + } + + /** Create a TooLBarLayout. + * @param hgap horizontal gap between components + * @param vgap vertical gap between components + */ + public ToolBarLayout(final int hgap, final int vgap) { + this.hgap = hgap; + this.vgap = vgap; + } + + private void addLayoutComponent(final ToolBarConstraints.Region region, final Component comp) { + synchronized (comp.getTreeLock()) { + List<Component> list = null; + switch (region) { + case NORTH: list = north; break; + case SOUTH: list = south; break; + case EAST: list = east; break; + case WEST: list = west; break; + case CENTER: center = comp; return; + } + assert list != null; + list.add(comp); + } + } + + private void addLayoutComponent(final ToolBarConstraints constraints, final Component comp) { + synchronized (comp.getTreeLock()) { + List<Component> list = null; + switch (constraints.region) { + case NORTH: list = north; break; + case SOUTH: list = south; break; + case EAST: list = east; break; + case WEST: list = west; break; + case CENTER: center = comp; return; + } + int pos = constraints.position; + assert list != null; + if (pos > list.size() || pos < 0) { + pos = list.size(); + } + list.add(pos, comp); + } + } + + /** {@inheritDoc} */ + @SuppressWarnings({"deprecation"}) + @Override public void addLayoutComponent(final String name, final Component comp) { + synchronized (comp.getTreeLock()) { + if (name == null || CENTER.equals(name)) { + center = comp; + } else if (NORTH.equals(name)) { + north.add(comp); + } else if (SOUTH.equals(name)) { + south.add(comp); + } else if (EAST.equals(name)) { + east.add(comp); + } else if (WEST.equals(name)) { + west.add(comp); + } else { + throw new IllegalArgumentException("cannot add to layout: unknown constraint: " + name); + } + } + } + + /** {@inheritDoc} */ + @Override public void addLayoutComponent(final Component comp, final Object constraints) { + synchronized (comp.getTreeLock()) { + if (constraints == null || constraints instanceof String) { + addLayoutComponent((String)constraints, comp); + } else if (constraints instanceof ToolBarConstraints) { + addLayoutComponent((ToolBarConstraints)constraints, comp); + } else if (constraints instanceof ToolBarConstraints.Region) { + addLayoutComponent((ToolBarConstraints.Region)constraints, comp); + } else { + throw new IllegalArgumentException("cannot add to layout: constraint must be a string (or null)"); + } + } + } + + /** {@inheritDoc} */ + @Override public float getLayoutAlignmentX(final Container parent) { + return 0.5f; + } + + /** {@inheritDoc} */ + @Override public float getLayoutAlignmentY(final Container parent) { + return 0.5f; + } + + /** {@inheritDoc} */ + @Override public void invalidateLayout(final Container target) { + /* Do Nothing, like BorderLayout. */ + } + + /** {@inheritDoc} */ + @Override public void layoutContainer(final Container target) { + synchronized (target.getTreeLock()) { + final Insets insets = target.getInsets(); + Dimension dim; + int top = insets.top; + int bottom = target.getHeight() - insets.bottom; + int left = insets.left; + int right = target.getWidth() - insets.right; + for (final Component comp : north) { + if (comp.isVisible()) { + comp.setSize(right - left, comp.getHeight()); + dim = comp.getPreferredSize(); + comp.setBounds(left, top, right - left, dim.height); + top += dim.height + vgap; + } + } + for (final Component comp : south) { + if (comp.isVisible()) { + comp.setSize(right - left, comp.getHeight()); + dim = comp.getPreferredSize(); + comp.setBounds(left, bottom - dim.height, right - left, dim.height); + bottom -= dim.height + vgap; + } + } + for (final Component comp : east) { + if (comp.isVisible()) { + comp.setSize(comp.getWidth(), bottom - top); + dim = comp.getPreferredSize(); + comp.setBounds(right - dim.width, top, dim.width, bottom - top); + right -= dim.width + hgap; + } + } + for (final Component comp : west) { + if (comp.isVisible()) { + comp.setSize(comp.getWidth(), bottom - top); + dim = comp.getPreferredSize(); + comp.setBounds(left, top, dim.width, bottom - top); + left += dim.width + hgap; + } + } + if (center != null) { + center.setBounds(left, top, right - left, bottom - top); + } + } + } + + /** {@inheritDoc} */ + @Override public Dimension maximumLayoutSize(final Container target) { + return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); + } + + /** {@inheritDoc} */ + @Override public Dimension minimumLayoutSize(final Container target) { + synchronized (target.getTreeLock()) { + Dimension dim; + final Dimension minimumLayoutSize = new Dimension(0, 0); + for (final Component comp : east) { + dim = comp.getMinimumSize(); + minimumLayoutSize.width += dim.width + hgap; + minimumLayoutSize.height = max(dim.height, minimumLayoutSize.height); + } + for (final Component comp : west) { + dim = comp.getMinimumSize(); + minimumLayoutSize.width += dim.width + hgap; + minimumLayoutSize.height = max(dim.height, minimumLayoutSize.height); + } + if (center != null) { + dim = center.getMinimumSize(); + minimumLayoutSize.width += dim.width; + minimumLayoutSize.height =max(dim.height, minimumLayoutSize.height); + } + for (final Component comp : north) { + dim = comp.getMinimumSize(); + minimumLayoutSize.width = max(dim.width, minimumLayoutSize.width); + minimumLayoutSize.height += dim.height + vgap; + } + for (final Component comp : south) { + dim = comp.getMinimumSize(); + minimumLayoutSize.width = max(dim.width, minimumLayoutSize.width); + minimumLayoutSize.height += dim.height + vgap; + } + final Insets insets = target.getInsets(); + minimumLayoutSize.width += insets.left + insets.right; + minimumLayoutSize.height += insets.top + insets.bottom; + return minimumLayoutSize; + } + } + + /** {@inheritDoc} */ + @Override public Dimension preferredLayoutSize(final Container target) { + synchronized (target.getTreeLock()) { + Dimension dim; + final Dimension preferredLayoutSize = new Dimension(0, 0); + for (final Component comp : east) { + dim = comp.getPreferredSize(); + preferredLayoutSize.width += dim.width + hgap; + preferredLayoutSize.height = max(dim.height, preferredLayoutSize.height); + } + for (final Component comp : west) { + dim = comp.getPreferredSize(); + preferredLayoutSize.width += dim.width + hgap; + preferredLayoutSize.height = max(dim.height, preferredLayoutSize.height); + } + if (center != null) { + dim = center.getPreferredSize(); + preferredLayoutSize.width += dim.width; + preferredLayoutSize.height =max(dim.height, preferredLayoutSize.height); + } + for (final Component comp : north) { + dim = comp.getPreferredSize(); + preferredLayoutSize.width = max(dim.width, preferredLayoutSize.width); + preferredLayoutSize.height += dim.height + vgap; + } + for (final Component comp : south) { + dim = comp.getPreferredSize(); + preferredLayoutSize.width = max(dim.width, preferredLayoutSize.width); + preferredLayoutSize.height += dim.height + vgap; + } + final Insets insets = target.getInsets(); + preferredLayoutSize.width += insets.left + insets.right; + preferredLayoutSize.height += insets.top + insets.bottom; + return preferredLayoutSize; + } + } + + /** {@inheritDoc} */ + @Override public void removeLayoutComponent(final Component comp) { + synchronized (comp.getTreeLock()) { + //noinspection ObjectEquality + if (comp == center) { + center = null; + } else if (north.contains(comp)) { + north.remove(comp); + } else if (south.contains(comp)) { + south.remove(comp); + } else if (east.contains(comp)) { + east.remove(comp); + } else if (west.contains(comp)) { + west.remove(comp); + } + } + } + + /** {@inheritDoc} */ + @Override public String toString() { + return getClass().getName() + "[hgap=" + hgap + ",vgap=" + vgap + ']'; + } + + /** Class for ToolBarLayout constraints. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ + public static class ToolBarConstraints implements Serializable { + + /** Serial Version. */ + @SuppressWarnings({"AnalyzingVariableNaming"}) + private static final long serialVersionUID = 1L; + + /** Enum for region. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ + public enum Region { + + /** Constraint for center region. */ + CENTER, + + /** Constraint for north region, last component. */ + NORTH, + + /** Constraint for south region, last component. */ + SOUTH, + + /** Constraint for east region, last component. */ + EAST, + + /** Constraint for west region, last component. */ + WEST, + + } // enum Region + + /** Constant for first position (0). */ + public static final int FIRST = 0; + + /** Constant for last position (-1). */ + public static final int LAST = -1; + + /** Region constraint. + * @serial include + */ + public Region region; + + /** Position constraint. + * @serial include + */ + public int position; + + /** Create Constraint. */ + public ToolBarConstraints() { + } + + /** Create Constraint with values. + * @param region Region + * @param position Position, must be non-negative + */ + public ToolBarConstraints(final Region region, final int position) { + this.region = region; + this.position = position; + } + + } // class ToolBarConstraint + +} // class ToolBarLayoutManager This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-12 09:32:43
|
Revision: 330 http://svn.sourceforge.net/japi/?rev=330&view=rev Author: christianhujer Date: 2007-05-12 02:32:41 -0700 (Sat, 12 May 2007) Log Message: ----------- Added junit to common. Added Paths: ----------- common/trunk/lib/LICENSE-junit.jar common/trunk/lib/junit.jar Added: common/trunk/lib/LICENSE-junit.jar =================================================================== --- common/trunk/lib/LICENSE-junit.jar (rev 0) +++ common/trunk/lib/LICENSE-junit.jar 2007-05-12 09:32:41 UTC (rev 330) @@ -0,0 +1,213 @@ +Common Public License Version 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial code and +documentation distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + + i) changes to the Program, and + + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are +distributed by that particular Contributor. A Contribution 'originates' from a +Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to +the Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free copyright license to +reproduce, prepare derivative works of, publicly display, publicly perform, +distribute and sublicense the Contribution of such Contributor, if any, and such +derivative works, in source code and object code form. + + b) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed +Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. +This patent license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other combinations +which include the Contribution. No hardware per se is licensed hereunder. + + c) Recipient understands that although each Contributor grants the licenses +to its Contributions set forth herein, no assurances are provided by any +Contributor that the Program does not infringe the patent or other intellectual +property rights of any other entity. Each Contributor disclaims any liability to +Recipient for claims brought by any other entity based on infringement of +intellectual property rights or otherwise. As a condition to exercising the +rights and licenses granted hereunder, each Recipient hereby assumes sole +responsibility to secure any other intellectual property rights needed, if any. +For example, if a third party patent license is required to allow Recipient to +distribute the Program, it is Recipient's responsibility to acquire that license +before distributing the Program. + + d) Each Contributor represents that to its knowledge it has sufficient +copyright rights in its Contribution, if any, to grant the copyright license set +forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its +own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + + b) its license agreement: + + i) effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + + ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and consequential +damages, such as lost profits; + + iii) states that any provisions which differ from this Agreement are offered +by that Contributor alone and not by any other party; and + + iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable manner on or +through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + + b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the +Program. + +Each Contributor must identify itself as the originator of its Contribution, if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, if +a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, damages +and costs (collectively "Losses") arising from claims, lawsuits and other legal +actions brought by a third party against the Indemnified Contributor to the +extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor to +control, and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may participate in +any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If that +Commercial Contributor then makes performance claims, or offers warranties +related to Product X, those performance claims and warranties are such +Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the Commercial +Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its exercise of +rights under this Agreement, including but not limited to the risks and costs of +program errors, compliance with applicable laws, damage to or loss of data, +programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS +GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable +law, it shall not affect the validity or enforceability of the remainder of the +terms of this Agreement, and without further action by the parties hereto, such +provision shall be reformed to the minimum extent necessary to make such +provision valid and enforceable. + +If Recipient institutes patent litigation against a Contributor with respect to +a patent applicable to software (including a cross-claim or counterclaim in a +lawsuit), then any patent licenses granted by that Contributor to such Recipient +under this Agreement shall terminate as of the date such litigation is filed. In +addition, if Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the Program +itself (excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted under +Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this Agreement. +IBM is the initial Agreement Steward. IBM may assign the responsibility to serve +as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the Agreement +is published, Contributor may elect to distribute the Program (including its +Contributions) under the new version. Except as expressly stated in Sections +2(a) and 2(b) above, Recipient receives no rights or licenses to the +intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. Property changes on: common/trunk/lib/LICENSE-junit.jar ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: common/trunk/lib/junit.jar =================================================================== (Binary files differ) Property changes on: common/trunk/lib/junit.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-12 09:14:23
|
Revision: 329 http://svn.sourceforge.net/japi/?rev=329&view=rev Author: christianhujer Date: 2007-05-12 02:14:21 -0700 (Sat, 12 May 2007) Log Message: ----------- Moved JEduca from historic to progs. Added Paths: ----------- progs/jeduca/trunk/src/ Removed Paths: ------------- historic/trunk/progs/jeduca/ Copied: progs/jeduca/trunk/src (from rev 328, historic/trunk/progs/jeduca/src) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-04-30 16:00:22
|
Revision: 328 http://svn.sourceforge.net/japi/?rev=328&view=rev Author: christianhujer Date: 2007-04-30 09:00:14 -0700 (Mon, 30 Apr 2007) Log Message: ----------- Improved documentation. Modified Paths: -------------- libs/taglets/trunk/src/doc/start.xhtml Modified: libs/taglets/trunk/src/doc/start.xhtml =================================================================== --- libs/taglets/trunk/src/doc/start.xhtml 2007-04-30 15:59:28 UTC (rev 327) +++ libs/taglets/trunk/src/doc/start.xhtml 2007-04-30 16:00:14 UTC (rev 328) @@ -30,5 +30,122 @@ JAPI Library Taglets is a collection of taglets that are used by the JAPI developers during JAPI development. They might also be useful for your Java project if you use Javadoc. </p> + <h2>Taglet Index (alphabetical)</h2> + <ul> + <li><a href="#tl_fixme"><code>@fixme</code></a></li> + </ul> + <h2>Taglet Index (grouped)</h2> + <ul> + <li> + Simple Documentation Taglets + <ul> + <li><a href="#tl_note"><code>@note</code></a></li> + <li><a href="#tl_warning"><code>@warning</code></a></li> + </ul> + </li> + <li> + Revisit-Taglets + <ul> + <li><a href="#tl_fixme"><code>@fixme</code></a></li> + <li><a href="#tl_todo"><code>@todo</code></a></li> + <li><a href="#tl_xxx"><code>@xxx</code></a></li> + </ul> + </li> + <li> + Contract Taglets + <ul> + <li><a href="#tl_invariant"><code>@invariant</code></a></li> + <li><a href="#tl_precondition"><code>@precondition</code></a></li> + <li><a href="#tl_postcondition"><code>@postcondition</code></a></li> + <li><a href="#tl_retval"><code>@retval</code></a></li> + </ul> + </li> + </ul> + <h2>The Taglets (alphabetical)</h2> + <h3 id="tl_fixme"><code>@fixme</code></h3> + <p> + The <code>@fixme</code> taglet can be used to denote code that's known to be broken and needs fixing later. + </p> + <h4>Example</h4> + <pre><![CDATA[ /** Shows the attributes dialog for the given game object. + * @fixme Currently this method is broken for game objects without an archetype. + */ + public void showDialog(final GameObject object) { + showDialog(object, object.getArchetype()); + }]]></pre> + <h3 id="tl_invariant"><code>@invariant</code></h3> + <p> + The <code>@invariant</code> taglet can be used to denote invariants in a symbol's contract. + </p> + <h4>Example</h4> + <pre><![CDATA[/** A simple constraint integer value class. + */ +public class ConstraintMutableInteger { + + /** Minimum allowed value (inclusive). */ + private int min; + + /** Maximum allowed value (inclusive). */ + private int max; + + /** Current value. + * @invariant current >= min + * @invariant max >= current + */ + private int current; + + // ... +}]]></pre> + <h3 id="tl_note"><code>@note</code></h3> + <p> + The <code>@note</code> taglet can be used to highlight notes for users of a symbol. + </p> + <h3 id="tl_postcondition"><code>@postcondition</code></h3> + <p> + The <code>@postcondition</code> taglet can be used to denote postconditions for an operation's contract. + </p> + <h4>Example</h4> + <pre><![CDATA[ /** Sorts a list in ascending order. + * @param list List to sort + * @postcondition <var>list</var> is sorted in ascending order + */ + public static void sort(final List<? extends Comparable> list) { /* ... */}]]></pre> + <h3 id="tl_precondition"><code>@precondition</code></h3> + <p> + The <code>@precondition</code> taglet can be used to denote preconditions for an operation's contract. + </p> + <h4>Example</h4> + <pre><![CDATA[ /** Performs a binary search over a list to search the desired element. + * @param list List to perform binary search on + * @param element Element to search for + * @return index of <var>element</var> in <var>list</var> or <code>-1</code> if not found + * @precondition <var>list</var> is sorted in ascending order + */ + public static <T> int binarySearch(final List<T> list, final T element) { /* ... */ }]]></pre> + <h3 id="tl_retval"><code>@retval</code></h3> + <p> + The <code>@retval</code> taglet can be used to denote return values for an operation's return. + </p> + <h4>Example</h4> + <pre><![CDATA[ /** Performs a binary search over a list to search the desired element. + * @param list List to perform binary search on + * @param element Element to search for + * @return search position + * @retval index of <var>element</var> in <var>list</var> if found + * @retval <code>-1</code> if not found + */ + public static <T> int binarySearch(final List<T> list, final T element) { /* ... */ }]]></pre> + <h3 id="tl_todo"><code>@todo</code></h3> + <p> + The <code>@fixme</code> taglet can be used to denote code that's known to be incomplete and needs completion later. + </p> + <h3 id="tl_warning"><code>@warning</code></h3> + <p> + The <code>@warning</code> taglet can be used to highlight warnings for users of a symbol. + </p> + <h3 id="tl_xxx"><code>@xxx</code></h3> + <p> + The <code>@xxx</code> taglet can be used to denote code that looks like being broken yet seems to work but should be reviewed and refactored later. + </p> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-04-30 15:59:45
|
Revision: 327 http://svn.sourceforge.net/japi/?rev=327&view=rev Author: christianhujer Date: 2007-04-30 08:59:28 -0700 (Mon, 30 Apr 2007) Log Message: ----------- Added annotations library to common/lib. Added Paths: ----------- common/trunk/lib/ common/trunk/lib/LICENSE-annotations.jar common/trunk/lib/annotations.jar Copied: common/trunk/lib/LICENSE-annotations.jar (from rev 326, historic/trunk/lib/LICENSE-annotations.jar) =================================================================== --- common/trunk/lib/LICENSE-annotations.jar (rev 0) +++ common/trunk/lib/LICENSE-annotations.jar 2007-04-30 15:59:28 UTC (rev 327) @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Copied: common/trunk/lib/annotations.jar (from rev 326, historic/trunk/lib/annotations.jar) =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-02-03 22:34:41
|
Revision: 326 http://svn.sourceforge.net/japi/?rev=326&view=rev Author: christianhujer Date: 2007-02-03 14:34:38 -0800 (Sat, 03 Feb 2007) Log Message: ----------- Fixed some documentation. Added taglet for documenting return values. Modified Paths: -------------- libs/taglets/trunk/src/net/sf/japi/taglets/InvariantTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/NoteTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/PostconditionTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/PreconditionTaglet.java Added Paths: ----------- libs/taglets/trunk/src/net/sf/japi/taglets/ReturnValueTaglet.java Modified: libs/taglets/trunk/src/net/sf/japi/taglets/InvariantTaglet.java =================================================================== --- libs/taglets/trunk/src/net/sf/japi/taglets/InvariantTaglet.java 2007-01-30 22:19:50 UTC (rev 325) +++ libs/taglets/trunk/src/net/sf/japi/taglets/InvariantTaglet.java 2007-02-03 22:34:38 UTC (rev 326) @@ -47,4 +47,4 @@ tagletMap.put(taglet.getName(), taglet); } -} // class WarningTaglet +} // class InvariantTaglet Modified: libs/taglets/trunk/src/net/sf/japi/taglets/NoteTaglet.java =================================================================== --- libs/taglets/trunk/src/net/sf/japi/taglets/NoteTaglet.java 2007-01-30 22:19:50 UTC (rev 325) +++ libs/taglets/trunk/src/net/sf/japi/taglets/NoteTaglet.java 2007-02-03 22:34:38 UTC (rev 326) @@ -47,4 +47,4 @@ tagletMap.put(taglet.getName(), taglet); } -} // class WarningTaglet +} // class NoteTaglet Modified: libs/taglets/trunk/src/net/sf/japi/taglets/PostconditionTaglet.java =================================================================== --- libs/taglets/trunk/src/net/sf/japi/taglets/PostconditionTaglet.java 2007-01-30 22:19:50 UTC (rev 325) +++ libs/taglets/trunk/src/net/sf/japi/taglets/PostconditionTaglet.java 2007-02-03 22:34:38 UTC (rev 326) @@ -67,4 +67,4 @@ tagletMap.put(taglet.getName(), taglet); } -} // class WarningTaglet +} // class PostConditionTaglet Modified: libs/taglets/trunk/src/net/sf/japi/taglets/PreconditionTaglet.java =================================================================== --- libs/taglets/trunk/src/net/sf/japi/taglets/PreconditionTaglet.java 2007-01-30 22:19:50 UTC (rev 325) +++ libs/taglets/trunk/src/net/sf/japi/taglets/PreconditionTaglet.java 2007-02-03 22:34:38 UTC (rev 326) @@ -67,4 +67,4 @@ tagletMap.put(taglet.getName(), taglet); } -} // class WarningTaglet +} // class PreconditionTaglet Added: libs/taglets/trunk/src/net/sf/japi/taglets/ReturnValueTaglet.java =================================================================== --- libs/taglets/trunk/src/net/sf/japi/taglets/ReturnValueTaglet.java (rev 0) +++ libs/taglets/trunk/src/net/sf/japi/taglets/ReturnValueTaglet.java 2007-02-03 22:34:38 UTC (rev 326) @@ -0,0 +1,67 @@ +/* + * JAPI libs-taglets is a library that has some useful additional taglets for javadoc. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package net.sf.japi.taglets; + +import com.sun.tools.doclets.Taglet; +import java.util.Map; + +/** + * Taglet for documenting return values. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class ReturnValueTaglet extends BlockListTaglet { + + /** + * Create a ReturnValueTaglet. + */ + private ReturnValueTaglet() { + super("retval", "Return Value", "Return Values"); + } + + /** {@inheritDoc} */ + @Override public boolean inField() { + return false; + } + + /** {@inheritDoc} */ + @Override public boolean inOverview() { + return false; + } + + /** {@inheritDoc} */ + @Override public boolean inPackage() { + return false; + } + + /** {@inheritDoc} */ + @Override public boolean inType() { + return false; + } + + /** + * Register this Taglet. + * @param tagletMap the map to register this tag to. + */ + public static void register(final Map<String, Taglet> tagletMap) { + final Taglet taglet = new ReturnValueTaglet(); + tagletMap.put(taglet.getName(), taglet); + } + +} // class ReturnValueTaglet Property changes on: libs/taglets/trunk/src/net/sf/japi/taglets/ReturnValueTaglet.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-30 22:19:54
|
Revision: 325 http://svn.sourceforge.net/japi/?rev=325&view=rev Author: christianhujer Date: 2007-01-30 14:19:50 -0800 (Tue, 30 Jan 2007) Log Message: ----------- Added registry implementation. Added Paths: ----------- libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java libs/registry/trunk/src/net/sf/japi/registry/NamedService.java Added: libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java =================================================================== --- libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java (rev 0) +++ libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java 2007-01-30 22:19:50 UTC (rev 325) @@ -0,0 +1,104 @@ +/* + * JAPI libs-registry is a library for providing a framework implementation lookup mechanism. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package net.sf.japi.registry; + +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import sun.misc.Service; +import java.util.Iterator; +import java.util.Collection; +import java.util.List; +import java.util.ArrayList; + +/** + * Lookup mechanism for {@link NamedService} implementations. + * The current implementation for Java 1.5 is based on {@link Service}. + * Future implementations (Java 1.6+) will be based on the corresponding replacement. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class NamedRegistry { + + /** + * Returns the implementation of the supplied {@link NamedService} with the specified name. + * @param service NamedService to get + * @param name Name of the implementation of the NamedService to get + * @return Implementation or <code>null</code> if none found. + */ + @Nullable public static <T extends NamedService> T getInstance(@NotNull final Class<T> service, @NotNull final String name) { + for (final Iterator<T> it = Service.providers(service); it.hasNext(); ) { + final T t = it.next(); + if (t.getName().equals(name)) { + return t; + } + } + return null; + } + + /** + * Returns all implementations of the supplied class. + * The returned list is yours, you may do with it whatever you like. + * It's not cached or so. + * Because this method is anonymous (not bound to names), it can be used for any kind of service, not just implementations of {@link NamedService}. + * @param service NamedService to get implementations for. + * @return List with all implementations, empty collection if none found. + */ + @NotNull public static <T> Collection<T> getAllInstances(@NotNull final Class<T> service) { + final List<T> instances = new ArrayList<T>(); + for (final Iterator<T> it = Service.providers(service); it.hasNext(); ) { + instances.add(it.next()); + } + return instances; + } + + /** + * Returns the implementation of the supplied {@link NamedService} with the specified name using the specified ClassLoader. + * @param service NamedService to get + * @param name Name of the implementation of the NamedService to get + * @param classLoader ClassLoader to use. + * @return Implementation or <code>null</code> if none found. + */ + @Nullable public static <T extends NamedService> T getInstance(@NotNull final Class<T> service, @NotNull final String name, @NotNull final ClassLoader classLoader) { + for (final Iterator<T> it = Service.providers(service, classLoader); it.hasNext(); ) { + final T t = it.next(); + if (t.getName().equals(name)) { + return t; + } + } + return null; + } + + /** + * Returns all implementations of the supplied class using the specified ClassLoader. + * The returned list is yours, you may do with it whatever you like. + * It's not cached or so. + * Because this method is anonymous (not bound to names), it can be used for any kind of service, not just implementations of {@link NamedService}. + * @param service Class to get implementations for. + * @param classLoader ClassLoader to use. + * @return List with all implementations, empty collection if none found. + */ + @NotNull public static <T> Collection<T> getAllInstances(@NotNull final Class<T> service, @NotNull final ClassLoader classLoader) { + final List<T> instances = new ArrayList<T>(); + for (final Iterator<T> it = Service.providers(service, classLoader); it.hasNext(); ) { + instances.add(it.next()); + } + return instances; + } + +} // class NamedRegistry Property changes on: libs/registry/trunk/src/net/sf/japi/registry/NamedRegistry.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: libs/registry/trunk/src/net/sf/japi/registry/NamedService.java =================================================================== --- libs/registry/trunk/src/net/sf/japi/registry/NamedService.java (rev 0) +++ libs/registry/trunk/src/net/sf/japi/registry/NamedService.java 2007-01-30 22:19:50 UTC (rev 325) @@ -0,0 +1,54 @@ +/* + * JAPI libs-registry is a library for providing a framework implementation lookup mechanism. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package net.sf.japi.registry; + +import org.jetbrains.annotations.NotNull; +import java.util.Locale; + +/** + * A named service can be instantiated with a public non-arg (default) constructor and provides two names. + * The first name is a technical name, suitable for locale <code>C_TYPE</code>, that's a language independent name. + * If there is no language independent name, the English name is used. + * The second name is a descriptive name, suitable for + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public interface NamedService { + + /** + * Returns a technical name, suitable for locale <code>C_TYPE</code>, command line arguments etc.. + * The returned name might be the same as the name returned by {@link #getDisplayName()} for English. + * @return A technical name. + */ + @NotNull String getName(); + + /** + * Returns a display name for the default locale. + * @return A display name. + */ + @NotNull String getDisplayName(); + + /** + * Returns a display name for the specified locale. + * @param locale Locale to get display name for. + * @return A display name for the specified locale. + */ + @NotNull String getDisplayName(@NotNull Locale locale); + +} // interface NamedService Property changes on: libs/registry/trunk/src/net/sf/japi/registry/NamedService.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-30 22:18:14
|
Revision: 324 http://svn.sourceforge.net/japi/?rev=324&view=rev Author: christianhujer Date: 2007-01-30 14:18:06 -0800 (Tue, 30 Jan 2007) Log Message: ----------- Fixed copyright comment typo. Modified Paths: -------------- libs/logging/trunk/libs-logging.iml Modified: libs/logging/trunk/libs-logging.iml =================================================================== --- libs/logging/trunk/libs-logging.iml 2007-01-30 21:03:41 UTC (rev 323) +++ libs/logging/trunk/libs-logging.iml 2007-01-30 22:18:06 UTC (rev 324) @@ -27,7 +27,7 @@ <option name="filler" value=" " /> </value> </option> - <option name="notice" value="JAPI libs-logging is a library for providing logging with i18n/l10n support and mappable to other . Copyright (C) &#36;today.year Christian Hujer. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" /> + <option name="notice" value="JAPI libs-logging is a library for providing logging with i18n/l10n support and mappable to other. Copyright (C) &#36;today.year Christian Hujer. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" /> <option name="keyword" value="Copyright" /> <option name="fileTypeOverride" value="4" /> <option name="relativeBefore" value="true" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-30 21:03:52
|
Revision: 323 http://svn.sourceforge.net/japi/?rev=323&view=rev Author: christianhujer Date: 2007-01-30 13:03:41 -0800 (Tue, 30 Jan 2007) Log Message: ----------- Adding registry module. Added Paths: ----------- libs/registry/ libs/registry/branches/ libs/registry/tags/ libs/registry/trunk/ libs/registry/trunk/README libs/registry/trunk/build.xml libs/registry/trunk/libs-registry.iml libs/registry/trunk/src/ libs/registry/trunk/src/net/ libs/registry/trunk/src/net/sf/ libs/registry/trunk/src/net/sf/japi/ libs/registry/trunk/src/net/sf/japi/registry/ Added: libs/registry/trunk/README =================================================================== --- libs/registry/trunk/README (rev 0) +++ libs/registry/trunk/README 2007-01-30 21:03:41 UTC (rev 323) @@ -0,0 +1,117 @@ +JAPI REGISTRY README +==================== + +This file contains some important information about Japi Registry. You should +read it first. + + +TABLE OF CONTENTS +----------------- +* project description +* project website +* system requirements +* file structure +* build / installation (see file INSTALL) +* maintainers / credits (see file CREDITS) +* project news (see file NEWS) +* mailing lists +* license information (see file LICENSE) + + +PROJECT DESCRIPTION +------------------- +Japi Registry is a library for dynamic lookup of framework implementations. +It is part of the Japi project. + + +PROJECT WEBSITE +--------------- +Project homepage: http://japi.sourceforge.net/ +Project website: http://sourceforge.net/projects/japi/ +Project statistics: http://cia.navi.cx/projects/japi +Subproject homepage: http://japi.sourceforge.net/registry/ + + +SYSTEM REQUIREMENTS +------------------- +Java 5.0 + Previous versions of Java will not work. Gridarta uses Generics, autoboxing, + static imports, foreach loops, assertions, covariant return types and varargs + quite a lot. + +Ant 1.6.5 + Previous versions of Ant might work but are not tested. + + +FILE STRUCTURE +-------------- +build.xml + The build file to build the project with Ant. + +COPYING + Japi Registry license conditions. Note: applies to Japi Registry only, not + third party libraries. + +CREDITS + List of project contributors. See also MAINTAINERS. + +INSTALL + Description of how to build and install Japi Registry. + +lib/ + Directory containing third party libraries used to build Japi Registry. + Please note that these thrid party libraries have their own license + conditions. The licenses of the third party libraries are included in the + lib/ directory. + +LICENSE + File with license information. + +MAINTAINERS + List of current project maintainers. See also CREDITS. + +NEWS + Project News. + +project.properties + File with automatically changed settings for Ant. + +README + This file. + +src/ + Source files. + + +BUILD / INSTALLATION +-------------------- +See the file INSTALL. + + +MAINTAINERS / CREDITS +--------------------- +See the file CREDITS. + + +PROJECT NEWS +------------ +See the file NEWS. + + +MAILING LISTS +------------- +Japi mailing lists are the usual sourceforge hosted sourceforge project +mailing lists. The current mailing lists are: +* jap...@li... + News for JAPI users and developers (low traffic) +* jap...@li... + japi developer talk list +* jap...@li... + svn commit digest list (named cvs for historic reasons) +To find out how to subscribe or read the archives, go to: + http://sourceforge.net/mail/?group_id=149894 + + +LICSENSE INFORMATION +-------------------- +See the file LICENSE Property changes on: libs/registry/trunk/README ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: libs/registry/trunk/build.xml =================================================================== --- libs/registry/trunk/build.xml (rev 0) +++ libs/registry/trunk/build.xml 2007-01-30 21:03:41 UTC (rev 323) @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ JAPI libs-registry is a library for parsing command line arguments. + ~ Copyright (C) 2007 Christian Hujer. + ~ + ~ This library is free software; you can redistribute it and/or + ~ modify it under the terms of the GNU Lesser General Public + ~ License as published by the Free Software Foundation; either + ~ version 2.1 of the License, or (at your option) any later version. + ~ + ~ This library is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ~ Lesser General Public License for more details. + ~ + ~ You should have received a copy of the GNU Lesser General Public + ~ License along with this library; if not, write to the Free Software + ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + --> + +<project name="japi lib registry" default="compile"> + + <property name="module.version" value="0.1" /> + <property name="module.name" value="japi-lib-registry" /> + <property name="module.shortname" value="registry" /> + <property name="module.title" value="Registry" /> + + <taskdef name="pack200" classpath="lib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" /> + + <target + name = "clean" + description = "Cleans Sandbox" + > + <delete dir="classes" /> + <delete dir="docs" /> + </target> + + <target + name = "compile" + description = "Compiles production classes" + > + <mkdir dir="classes/production/${module.shortname}" /> + <mkdir dir="classes/test/${module.shortname}" /> + <javac + srcdir="src" + destdir="classes/production/${module.shortname}" + encoding="utf-8" + source="1.5" + target="1.5" + > + <classpath> + <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" /> + </classpath> + <exclude name="test/**/*.java" /> + </javac> + <copy + todir="classes/production/${module.shortname}" + > + <fileset dir="src" includes="**/*.properties" /> + <fileset dir="src" includes="META-INF/services/**" /> + </copy> + </target> + + <target + name = "dist" + description = "Packs distribution archives." + depends = "clean, compile" + > + <!--depends = "clean, compile, doc" + --> + <delete dir="dist" /> + <mkdir dir="dist" /> + <property name="distName" value="dist/${module.name}-${module.version}" /> + <parallel> + <tar tarfile="${distName}.src.tar"> + <tarfileset dir="." prefix="${module.name}-${module.version}"> + <include name="src/**" /> + <include name="build.xml" /> + </tarfileset> + </tar> + <zip destfile="${distName}.src.zip"> + <zipfileset dir="." prefix="${module.name}-${module.version}"> + <include name="src/**" /> + <include name="build.xml" /> + </zipfileset> + </zip> + <jar destfile="${distName}.src.jar"> + <zipfileset dir="." prefix="${module.name}-${module.version}"> + <include name="src/**" /> + <include name="build.xml" /> + </zipfileset> + </jar> + <jar destfile="${distName}.jar"> + <zipfileset dir="classes" excludes="production/**,test/**"/> + <manifest> + <attribute name="Implementation-Title" value="${module.name}" /> + <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" /> + <attribute name="Implementation-Version" value="${module.version}" /> + <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" /> + </manifest> + </jar> + <tar tarfile="${distName}.doc.tar"> + <tarfileset dir="." prefix="${module.name}-${module.version}"> + <include name="docs/**" /> + <include name="build.xml" /> + </tarfileset> + </tar> + <zip destfile="${distName}.doc.zip"> + <zipfileset dir="." prefix="${module.name}-${module.version}"> + <include name="docs/**" /> + <include name="build.xml" /> + </zipfileset> + </zip> + <jar destfile="${distName}.doc.jar"> + <zipfileset dir="." prefix="${module.name}-${module.version}"> + <include name="docs/**" /> + </zipfileset> + </jar> + </parallel> + <parallel> + <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" /> + <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" /> + <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" /> + <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" /> + <pack200 + src="${distName}.jar" + destfile="${distName}.pack.gz" + gzipoutput="true" + stripdebug="true" + effort="9" + keepfileorder="false" + modificationtime="latest" + deflatehint="false" + /> + </parallel> + <delete file="${distName}.src.tar" /> + <delete file="${distName}.doc.tar" /> + </target> + + <target + name = "doc" + description = "Creates public javadoc documentation." + > + <mkdir dir="docs/api" /> + <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" /> + <copy todir="docs/api" file="src/doc/api/public/.htaccess" /--> + <javadoc + destdir = "docs/api" + access = "protected" + author = "yes" + version = "yes" + locale = "en_US" + use = "yes" + splitindex = "yes" + windowtitle = "JAPI Library ${module.title} ${module.version} API documentation" + doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" + header = "JAPI Library ${module.title} ${module.version}<br />API Documentation" + footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" + bottom = "<div style=" text-align:center;">© 2005-2006 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>" + serialwarn = "yes" + charset = "utf-8" + docencoding = "utf-8" + encoding = "utf-8" + source = "1.5" + linksource = "yes" + link = "${user.javadoc.link}" + > + <!-- + overview = "src/overview.html" + --> + <classpath> + <fileset dir="lib" includes="annotations.jar" /> + </classpath> + <sourcepath> + <pathelement path="${user.javadoc.javasrc}" /> + <pathelement path="src" /> + </sourcepath> + <packageset + dir="src" + defaultexcludes="yes" + > + <include name="net/**" /> + </packageset> + <tag enabled="true" name="retval" description="Return Values:" scope="methods" /> + <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" /> + <tag enabled="true" name="post" description="Postconditions:" scope="methods" /> + <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" /> + <tag enabled="true" name="note" description="Notes:" /> + <tag enabled="true" name="warning" description="Warnings:" /> + <!--tag enabled="true" name="todo" description="Todo:" /--> + <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" /> + <tag enabled="true" name="fixme" description="Fixme:" /> + <tag enabled="true" name="xxx" description="XXX:" /> + </javadoc> + </target> + +</project> Property changes on: libs/registry/trunk/build.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + LF Added: libs/registry/trunk/libs-registry.iml =================================================================== --- libs/registry/trunk/libs-registry.iml (rev 0) +++ libs/registry/trunk/libs-registry.iml 2007-01-30 21:03:41 UTC (rev 323) @@ -0,0 +1,187 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module version="4" relativePaths="true" type="JAVA_MODULE"> + <component name="ModuleRootManager" /> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntryProperties /> + </component> + <component name="copyright"> + <Base> + <setting name="state" value="0" /> + </Base> + <LanguageOptions name="$TEMPLATE$"> + <option name="templateOptions"> + <value> + <option name="block" value="true" /> + <option name="separateBefore" value="false" /> + <option name="separateAfter" value="false" /> + <option name="prefixLines" value="true" /> + <option name="lenBefore" value="80" /> + <option name="lenAfter" value="80" /> + <option name="box" value="false" /> + <option name="filler" value=" " /> + </value> + </option> + <option name="notice" value="JAPI libs-registry is a library for providing a framework implementation lookup mechanism. Copyright (C) &#36;today.year Christian Hujer. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" /> + <option name="keyword" value="Copyright" /> + <option name="fileTypeOverride" value="4" /> + <option name="relativeBefore" value="true" /> + <option name="addBlankAfter" value="true" /> + <option name="fileLocation" value="1" /> + <option name="useAlternate" value="false" /> + </LanguageOptions> + <LanguageOptions name="CSS"> + <option name="templateOptions"> + <value> + <option name="block" value="true" /> + <option name="separateBefore" value="false" /> + <option name="separateAfter" value="false" /> + <option name="prefixLines" value="true" /> + <option name="lenBefore" value="80" /> + <option name="lenAfter" value="80" /> + <option name="box" value="false" /> + <option name="filler" value=" " /> + </value> + </option> + <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." /> + <option name="keyword" value="Copyright" /> + <option name="fileTypeOverride" value="2" /> + <option name="relativeBefore" value="true" /> + <option name="addBlankAfter" value="true" /> + <option name="fileLocation" value="1" /> + <option name="useAlternate" value="false" /> + </LanguageOptions> + <LanguageOptions name="HTML"> + <option name="templateOptions"> + <value> + <option name="block" value="true" /> + <option name="separateBefore" value="false" /> + <option name="separateAfter" value="false" /> + <option name="prefixLines" value="true" /> + <option name="lenBefore" value="80" /> + <option name="lenAfter" value="80" /> + <option name="box" value="false" /> + <option name="filler" value=" " /> + </value> + </option> + <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." /> + <option name="keyword" value="Copyright" /> + <option name="fileTypeOverride" value="2" /> + <option name="relativeBefore" value="true" /> + <option name="addBlankAfter" value="true" /> + <option name="fileLocation" value="1" /> + <option name="useAlternate" value="false" /> + </LanguageOptions> + <LanguageOptions name="JAVA"> + <option name="templateOptions"> + <value> + <option name="block" value="true" /> + <option name="separateBefore" value="false" /> + <option name="separateAfter" value="false" /> + <option name="prefixLines" value="true" /> + <option name="lenBefore" value="80" /> + <option name="lenAfter" value="80" /> + <option name="box" value="false" /> + <option name="filler" value=" " /> + </value> + </option> + <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." /> + <option name="keyword" value="Copyright" /> + <option name="fileTypeOverride" value="2" /> + <option name="relativeBefore" value="true" /> + <option name="addBlankAfter" value="true" /> + <option name="fileLocation" value="1" /> + <option name="useAlternate" value="false" /> + </LanguageOptions> + <LanguageOptions name="JSP"> + <option name="templateOptions"> + <value> + <option name="block" value="true" /> + <option name="separateBefore" value="false" /> + <option name="separateAfter" value="false" /> + <option name="prefixLines" value="true" /> + <option name="lenBefore" value="80" /> + <option name="lenAfter" value="80" /> + <option name="box" value="false" /> + <option name="filler" value=" " /> + </value> + </option> + <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." /> + <option name="keyword" value="Copyright" /> + <option name="fileTypeOverride" value="2" /> + <option name="relativeBefore" value="true" /> + <option name="addBlankAfter" value="true" /> + <option name="fileLocation" value="1" /> + <option name="useAlternate" value="false" /> + </LanguageOptions> + <LanguageOptions name="JavaScript"> + <option name="templateOptions"> + <value> + <option name="block" value="true" /> + <option name="separateBefore" value="false" /> + <option name="separateAfter" value="false" /> + <option name="prefixLines" value="true" /> + <option name="lenBefore" value="80" /> + <option name="lenAfter" value="80" /> + <option name="box" value="false" /> + <option name="filler" value=" " /> + </value> + </option> + <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." /> + <option name="keyword" value="Copyright" /> + <option name="fileTypeOverride" value="2" /> + <option name="relativeBefore" value="true" /> + <option name="addBlankAfter" value="true" /> + <option name="fileLocation" value="1" /> + <option name="useAlternate" value="false" /> + </LanguageOptions> + <LanguageOptions name="Properties"> + <option name="templateOptions"> + <value> + <option name="block" value="true" /> + <option name="separateBefore" value="false" /> + <option name="separateAfter" value="false" /> + <option name="prefixLines" value="true" /> + <option name="lenBefore" value="80" /> + <option name="lenAfter" value="80" /> + <option name="box" value="false" /> + <option name="filler" value=" " /> + </value> + </option> + <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." /> + <option name="keyword" value="Copyright" /> + <option name="fileTypeOverride" value="2" /> + <option name="relativeBefore" value="true" /> + <option name="addBlankAfter" value="true" /> + <option name="fileLocation" value="1" /> + <option name="useAlternate" value="false" /> + </LanguageOptions> + <LanguageOptions name="XML"> + <option name="templateOptions"> + <value> + <option name="block" value="true" /> + <option name="separateBefore" value="false" /> + <option name="separateAfter" value="false" /> + <option name="prefixLines" value="true" /> + <option name="lenBefore" value="80" /> + <option name="lenAfter" value="80" /> + <option name="box" value="false" /> + <option name="filler" value=" " /> + </value> + </option> + <option name="notice" value="Copyright (c) &#36;today.year, Your Corporation. All Rights Reserved." /> + <option name="keyword" value="Copyright" /> + <option name="fileTypeOverride" value="2" /> + <option name="relativeBefore" value="true" /> + <option name="addBlankAfter" value="true" /> + <option name="fileLocation" value="1" /> + <option name="useAlternate" value="false" /> + </LanguageOptions> + </component> +</module> + Property changes on: libs/registry/trunk/libs-registry.iml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-30 20:51:30
|
Revision: 322 http://svn.sourceforge.net/japi/?rev=322&view=rev Author: christianhujer Date: 2007-01-30 12:51:18 -0800 (Tue, 30 Jan 2007) Log Message: ----------- Commit for preliminary support of configurable codecs. (Unfinnished) Modified Paths: -------------- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecSelectionPanel.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecStep.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecStepsListModel.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/EntityCodec.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/IdentityCodec.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/JavaBytesCodec.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/StringCodec.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/URLEncodeCodec.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/action.properties Added Paths: ----------- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/AbstractStringCodec.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecListModel.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/DoubleListController.java tools/string2bytes/trunk/src/net/sf/japi/string2bytes/ListOrderController.java Added: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/AbstractStringCodec.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/AbstractStringCodec.java (rev 0) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/AbstractStringCodec.java 2007-01-30 20:51:18 UTC (rev 322) @@ -0,0 +1,40 @@ +/* + * String2Bytes is a program for converting Strings into byte arrays. + * Copyright (C) 2007 Christian Hujer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.japi.string2bytes; + +import org.jetbrains.annotations.Nullable; + +/** + * Base implementation for StringCodecs. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public abstract class AbstractStringCodec implements StringCodec { + + /** {@inheritDoc} */ + @Nullable public String getDisplayName() { + return getClass().getName(); + } + + /** {@inheritDoc} */ + public String toString() { + return getDisplayName(); + } + +} // class AbstractStringCodec Property changes on: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/AbstractStringCodec.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecListModel.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecListModel.java (rev 0) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecListModel.java 2007-01-30 20:51:18 UTC (rev 322) @@ -0,0 +1,52 @@ +/* + * String2Bytes is a program for converting Strings into byte arrays. + * Copyright (C) 2007 Christian Hujer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.japi.string2bytes; + +import javax.swing.ListModel; +import javax.swing.event.ListDataListener; + +/** + * ListModel for codecs. + * Immutable, holds all available codecs. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class CodecListModel implements ListModel { + + /** {@inheritDoc} */ + public int getSize() { + return StringCodec.ALL_CODECS.size(); + } + + /** {@inheritDoc} */ + public Object getElementAt(final int i) { + return StringCodec.ALL_CODECS.get(i); + } + + /** {@inheritDoc} */ + public void addListDataListener(final ListDataListener listDataListener) { + // Because we don't fire events, we ignore listeners. + } + + /** {@inheritDoc} */ + public void removeListDataListener(final ListDataListener listDataListener) { + // Because we don't fire events, we ignore listeners. + } + +} // class CodecListModel Property changes on: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecListModel.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecSelectionPanel.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecSelectionPanel.java 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecSelectionPanel.java 2007-01-30 20:51:18 UTC (rev 322) @@ -23,20 +23,29 @@ import javax.swing.JList; import javax.swing.JLabel; import javax.swing.JScrollPane; +import javax.swing.DefaultListModel; +import javax.swing.JFrame; +import javax.swing.event.ListSelectionListener; +import javax.swing.event.ListSelectionEvent; import java.awt.GridBagLayout; import java.awt.GridBagConstraints; +import net.sf.japi.swing.ActionFactory; +import org.jetbrains.annotations.NotNull; /** * The CodecSelectionPanel allows the selection and configuration of one or more CodecSteps. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class CodecSelectionPanel extends JPanel { +public class CodecSelectionPanel extends JPanel implements ListSelectionListener { + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.japi.string2bytes"); + /** The list with the available codecs. */ - private JList availableCodecsList = new JList(); + private JList availableCodecsList = new JList(new CodecListModel()); /** The list with the configured codec steps. */ - private JList configuredCodecSteps = new JList(); + private JList configuredCodecSteps = new JList(new CodecStepsListModel()); /** * Creates a CodecSelectionPanel. @@ -44,10 +53,25 @@ public CodecSelectionPanel() { super(new GridBagLayout()); final GridBagConstraints gbc = new GridBagConstraints(); - add(new JLabel("Available Codec"), gbc); - add(new JLabel("Selected Codecs"), gbc); + gbc.fill = GridBagConstraints.BOTH; + gbc.weightx = 1.0; + gbc.gridx = 1; + gbc.gridy = 1; + add(new JLabel(ACTION_FACTORY.getString("availableCodecs.label")), gbc); + gbc.gridx = 3; + add(new JLabel(ACTION_FACTORY.getString("selectedCodecs.label")), gbc); + gbc.gridx = 1; + gbc.weighty = 1.0; + gbc.gridy = 2; add(new JScrollPane(availableCodecsList), gbc); + gbc.gridx = 3; add(new JScrollPane(configuredCodecSteps), gbc); + gbc.weightx = 0.0; + gbc.gridx = 2; + add(new DoubleListController(availableCodecsList, configuredCodecSteps), gbc); + gbc.gridx = 4; + add(new ListOrderController((DefaultListModel) configuredCodecSteps.getModel(), configuredCodecSteps.getSelectionModel()), gbc); + configuredCodecSteps.addListSelectionListener(this); } /** @@ -55,6 +79,15 @@ * @param args Command line arguments (ignored) */ public static void main(final String... args) { + JFrame f = new JFrame(); + f.add(new CodecSelectionPanel()); + f.pack(); + f.setVisible(true); } + /** {@inheritDoc} */ + public void valueChanged(@NotNull final ListSelectionEvent listSelectionEvent) { + // TODO + } + } // class CodecSelectionPanel Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecStep.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecStep.java 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecStep.java 2007-01-30 20:51:18 UTC (rev 322) @@ -75,4 +75,9 @@ this.codec = codec; } + /** {@inheritDoc} */ + public String toString() { + return codec + " [" + getCharset() + "]"; + } + } // class CodecStep Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecStepsListModel.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecStepsListModel.java 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecStepsListModel.java 2007-01-30 20:51:18 UTC (rev 322) @@ -28,4 +28,13 @@ * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class CodecStepsListModel extends DefaultListModel { + + /** {@inheritDoc} */ + @Override public void insertElementAt(final Object object, final int i) { + if (!(object instanceof StringCodec)) { + throw new IllegalArgumentException(object + " not instanceof " + StringCodec.class); + } + super.insertElementAt(new CodecStep((StringCodec) object, "utf-8"), i); + } + } // class CodecStepsListModel Added: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/DoubleListController.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/DoubleListController.java (rev 0) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/DoubleListController.java 2007-01-30 20:51:18 UTC (rev 322) @@ -0,0 +1,133 @@ +/* + * String2Bytes is a program for converting Strings into byte arrays. + * Copyright (C) 2007 Christian Hujer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.japi.string2bytes; + +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import javax.swing.Action; +import javax.swing.DefaultListModel; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; +import net.sf.japi.swing.ActionFactory; +import net.sf.japi.swing.ActionMethod; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * A Controller that controles two lists, offering to add or remove elements from the second list. + * Elements from the first list can be added to the second list based on the selection made in the first list. + * Elements from the second list can be removed from the second list based on the selection made in the second list. + * The first list, which is not modified by this controller, is called source list. + * The second list, which can be modified by this controller, is called target list. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class DoubleListController extends JComponent implements ListSelectionListener { + + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.japi.string2bytes"); + + /** + * The first list (source list) to operate on. + */ + @NotNull private final JList sourceList; + + /** + * The second list (target list) to operate on. + */ + @NotNull private final JList targetList; + + /** + * The Action for adding elements to the second (target) list based on the selection from the first list. + */ + @NotNull private final Action add = ACTION_FACTORY.createAction(false, "add", this); + + /** + * The Action for removing elements from the second (target) list. + */ + @NotNull private final Action remove = ACTION_FACTORY.createAction(false, "remove", this); + + /** + * Create a DoubleListController. + * @param sourceList First list to operate on (source list). + * @param targetList Second list to operate on (target list). + */ + public DoubleListController(@NotNull final JList sourceList, @NotNull final JList targetList) { + this.sourceList = sourceList; + this.targetList = targetList; + setLayout(new GridBagLayout()); + final GridBagConstraints gbc = new GridBagConstraints(); + gbc.weighty = 1.0; + gbc.gridx = 1; + gbc.fill = GridBagConstraints.HORIZONTAL; + gbc.insets = new Insets(5, 5, 5, 5); + gbc.anchor = GridBagConstraints.SOUTH; + gbc.gridy = 1; + add(new JButton(add), gbc); + gbc.anchor = GridBagConstraints.NORTH; + gbc.gridy = 2; + add(new JButton(remove), gbc); + sourceList.addListSelectionListener(this); + targetList.addListSelectionListener(this); + valueChanged(null); + } + + /** + * Action for adding an element to the target list based on the selection from the source list. + */ + @ActionMethod public void add() { + final int index = sourceList.getSelectionModel().getMinSelectionIndex(); + if (index == -1) { + return; + } + final Object element = sourceList.getModel().getElementAt(index); + int targetIndex = targetList.getSelectionModel().getMaxSelectionIndex(); + if (targetIndex == -1) { + targetIndex = targetList.getModel().getSize(); + } + ((DefaultListModel) targetList.getModel()).insertElementAt(element, targetIndex); + } + + /** + * Action for removing an element from the target list. + */ + @ActionMethod public void remove() { + final int index = targetList.getSelectionModel().getMinSelectionIndex(); + if (index == -1) { + return; + } + ((DefaultListModel) targetList.getModel()).remove(index); + } + + /** {@inheritDoc} */ + public void valueChanged(@Nullable final ListSelectionEvent listSelectionEvent) { + @Nullable final Object source = listSelectionEvent != null ? listSelectionEvent.getSource() : null; + if (source == null || source == sourceList || source == sourceList.getSelectionModel()) { + add.setEnabled(sourceList.getSelectionModel().getMinSelectionIndex() >= 0); + } + if (source == null || source == targetList || source == targetList.getSelectionModel()) { + remove.setEnabled(targetList.getSelectionModel().getMinSelectionIndex() >= 0); + } + } + +} // class DoubleListController Property changes on: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/DoubleListController.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/EntityCodec.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/EntityCodec.java 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/EntityCodec.java 2007-01-30 20:51:18 UTC (rev 322) @@ -23,15 +23,17 @@ import java.util.Formatter; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; /** * A Codec which encodes a String by adding Entities. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class EntityCodec implements StringCodec { +public class EntityCodec extends AbstractStringCodec { /** {@inheritDoc} */ - public String code(final String input, final String charsetName) throws UnsupportedEncodingException { + @NotNull public String code(@NotNull final String input, final String charsetName) throws UnsupportedEncodingException { final Charset charset = Charset.forName(charsetName); final CharsetEncoder encoder = charset.newEncoder(); final StringBuilder cooked = new StringBuilder(); @@ -47,4 +49,9 @@ return cooked.toString(); } + /** {@inheritDoc} */ + @Nullable public String getDisplayName() { + return "XML entities"; + } + } // class EntityCodec Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/IdentityCodec.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/IdentityCodec.java 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/IdentityCodec.java 2007-01-30 20:51:18 UTC (rev 322) @@ -20,16 +20,23 @@ package net.sf.japi.string2bytes; import java.io.UnsupportedEncodingException; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; /** * A Codec that doesn't perform any conversion. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class IdentityCodec implements StringCodec { +public class IdentityCodec extends AbstractStringCodec { /** {@inheritDoc} */ - public String code(final String input, final String charsetName) throws UnsupportedEncodingException { + @NotNull public String code(@NotNull final String input, final String charsetName) throws UnsupportedEncodingException { return input; } + /** {@inheritDoc} */ + @Nullable public String getDisplayName() { + return "Identity"; + } + } // class IdentityCodec Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/JavaBytesCodec.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/JavaBytesCodec.java 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/JavaBytesCodec.java 2007-01-30 20:51:18 UTC (rev 322) @@ -21,15 +21,17 @@ import java.io.UnsupportedEncodingException; import java.util.Formatter; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; /** * A Codec which converts the input String into a suitable Java Array source code. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class JavaBytesCodec implements StringCodec { +public class JavaBytesCodec extends AbstractStringCodec { /** {@inheritDoc} */ - public String code(final String input, final String charsetName) throws UnsupportedEncodingException { + @NotNull public String code(@NotNull final String input, final String charsetName) throws UnsupportedEncodingException { final Formatter result = new Formatter(); result.format("{ "); final byte[] bytes = input.getBytes(charsetName); @@ -44,4 +46,9 @@ return result.toString(); } + /** {@inheritDoc} */ + @Nullable public String getDisplayName() { + return "Java Bytes"; + } + } // class JavaBytesCodec Added: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/ListOrderController.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/ListOrderController.java (rev 0) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/ListOrderController.java 2007-01-30 20:51:18 UTC (rev 322) @@ -0,0 +1,260 @@ +/* + * String2Bytes is a program for converting Strings into byte arrays. + * Copyright (C) 2007 Christian Hujer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.japi.string2bytes; + +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import javax.swing.Action; +import javax.swing.DefaultListModel; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.ListSelectionModel; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; +import net.sf.japi.swing.ActionFactory; +import net.sf.japi.swing.ActionMethod; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * A Control for changing the order of items in a {@link JList}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class ListOrderController extends JComponent implements ListSelectionListener { + + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.japi.string2bytes"); + + /** + * The JList to operate on. + * If <code>null</code>, this ListOrderController is currently disconnected. + */ + @Nullable private DefaultListModel listModel; + + /** + * The list selection model to operate on. + * If <code>null</code>, this ListOrderController is currently disconnected. + */ + @Nullable private ListSelectionModel selectionModel; + + /** + * Action for top. + */ + @NotNull private final Action top = ACTION_FACTORY.createAction(false, "top", this); + + /** + * Action for up. + */ + @NotNull private final Action up = ACTION_FACTORY.createAction(false, "up", this); + + /** + * Action for down. + */ + @NotNull private final Action down = ACTION_FACTORY.createAction(false, "down", this); + + /** + * Action for bottom. + */ + @NotNull private final Action bottom = ACTION_FACTORY.createAction(false, "bottom", this); + + /** + * Create a ListOrderController that's not yet connected to a list. + */ + public ListOrderController() { + this(null, null); + } + + /** + * Create a ListOrderController for a list. + * @param listModel List model to create ListOrderController for. + * @param selectionModel Selection model to create ListOrderController for. + */ + public ListOrderController(@Nullable final DefaultListModel listModel, @Nullable final ListSelectionModel selectionModel) { + setLayout(new GridBagLayout()); + setListAndSelectionModels(listModel, selectionModel); + final GridBagConstraints gbc = new GridBagConstraints(); + gbc.gridwidth = GridBagConstraints.REMAINDER; + gbc.insets = new Insets(5, 5, 5, 5); + gbc.fill = GridBagConstraints.HORIZONTAL; + gbc.anchor = GridBagConstraints.SOUTH; + gbc.weighty = 1.0; + add(new JButton(top), gbc); + gbc.anchor = GridBagConstraints.CENTER; + gbc.weighty = 0.0; + add(new JButton(up), gbc); + add(new JButton(down), gbc); + gbc.anchor = GridBagConstraints.NORTH; + gbc.weighty = 1.0; + add(new JButton(bottom), gbc); + } + + /** + * Sets the list model to use. + * @param listModel The list model to use. + */ + public void setListModel(@Nullable final DefaultListModel listModel) { + if (this.listModel == listModel) { + return; + } + this.listModel = listModel; + updateActions(); + } + + /** + * Returns the list model that's currently used. + * @return Currently used list model. + */ + @Nullable public DefaultListModel getListModel() { + return listModel; + } + + /** + * Sets the selection model to use. + * @param selectionModel The selection model to use. + */ + public void setSelectionModel(@Nullable final ListSelectionModel selectionModel) { + if (this.selectionModel == selectionModel) { + return; + } + if (this.selectionModel != null) { + this.selectionModel.removeListSelectionListener(this); + } + this.selectionModel = selectionModel; + if (selectionModel != null) { + selectionModel.addListSelectionListener(this); + } + updateActions(); + } + + /** + * Returns the selection model that's currently used. + * @return Currently used selection model. + */ + @Nullable public ListSelectionModel getSelectionModel() { + return selectionModel; + } + + /** + * Sets the list and selection model to use. + * @param listModel The list model to use. + * @param selectionModel The selection model to use. + */ + public void setListAndSelectionModels(@Nullable final DefaultListModel listModel, @Nullable final ListSelectionModel selectionModel) { + if (this.selectionModel == selectionModel && this.listModel == listModel) { + return; + } + this.listModel = listModel; + setSelectionModel(selectionModel); + } + + /** + * Updates the enabled state of the actions. + * Use this in case all actions need to be updated. + */ + private void updateActions() { + final boolean globalEnabled = listModel != null && selectionModel != null; + final int index = selectionModel != null ? selectionModel.getMinSelectionIndex() : -1; + final int maxIndex = listModel != null ? listModel.size() : -1; + top.setEnabled(globalEnabled && index > 0); + up.setEnabled(globalEnabled && index > 0); + down.setEnabled(globalEnabled && index != -1 && index < maxIndex - 1); + bottom.setEnabled(globalEnabled && index != -1 && index < maxIndex - 1); + } + + /** + * Mode the currently selected entry to top. + */ + @ActionMethod public void top() { + final ListSelectionModel tmpSelectionModel = selectionModel; + final DefaultListModel tmpListModel = listModel; + if (tmpSelectionModel == null || tmpListModel == null) { + return; + } + final int oldIndex = tmpSelectionModel.getMinSelectionIndex(); + final int newIndex = 0; + if (oldIndex <= 0) { + return; + } + tmpListModel.insertElementAt(tmpListModel.remove(oldIndex), newIndex); + tmpSelectionModel.setSelectionInterval(newIndex, newIndex); + } + + /** + * Move the currently selected entry up. + */ + @ActionMethod public void up() { + final ListSelectionModel tmpSelectionModel = selectionModel; + final DefaultListModel tmpListModel = listModel; + if (tmpSelectionModel == null || tmpListModel == null) { + return; + } + final int oldIndex = tmpSelectionModel.getMinSelectionIndex(); + final int newIndex = oldIndex - 1; + if (oldIndex <= 0) { + return; + } + tmpListModel.insertElementAt(tmpListModel.remove(oldIndex), newIndex); + tmpSelectionModel.setSelectionInterval(newIndex, newIndex); + } + + /** + * Move the currently selected entry down. + */ + @ActionMethod public void down() { + final ListSelectionModel tmpSelectionModel = selectionModel; + final DefaultListModel tmpListModel = listModel; + if (tmpSelectionModel == null || tmpListModel == null) { + return; + } + final int oldIndex = tmpSelectionModel.getMinSelectionIndex(); + final int newIndex = oldIndex + 1; + if (oldIndex >= tmpListModel.size() - 1 || oldIndex < 0) { + return; + } + tmpListModel.insertElementAt(tmpListModel.remove(oldIndex), newIndex); + tmpSelectionModel.setSelectionInterval(newIndex, newIndex); + } + + /** + * Move the currently selected entry to bottom. + */ + @ActionMethod public void bottom() { + final ListSelectionModel tmpSelectionModel = selectionModel; + final DefaultListModel tmpListModel = listModel; + if (tmpSelectionModel == null || tmpListModel == null) { + return; + } + final int oldIndex = tmpSelectionModel.getMinSelectionIndex(); + final int newIndex = tmpListModel.size() - 1; + if (oldIndex >= tmpListModel.size() - 1 || oldIndex < 0) { + return; + } + tmpListModel.insertElementAt(tmpListModel.remove(oldIndex), newIndex); + tmpSelectionModel.setSelectionInterval(newIndex, newIndex); + } + + /** {@inheritDoc} */ + public void valueChanged(@NotNull final ListSelectionEvent listSelectionEvent) { + updateActions(); + } + +} // class ListOrderController Property changes on: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/ListOrderController.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/StringCodec.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/StringCodec.java 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/StringCodec.java 2007-01-30 20:51:18 UTC (rev 322) @@ -23,6 +23,8 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * A StringCodec is a class that can convert Strings into other Strings. @@ -32,8 +34,9 @@ /** * Unmodifiable list with all Codecs. + * @deprecated This will be replaced using a registry. */ - List<StringCodec> ALL_CODECS = Collections.unmodifiableList(Arrays.asList(new IdentityCodec(), new JavaBytesCodec(), new EntityCodec(), new URLEncodeCodec())); + @Deprecated List<? extends StringCodec> ALL_CODECS = Collections.unmodifiableList(Arrays.asList(new IdentityCodec(), new JavaBytesCodec(), new EntityCodec(), new URLEncodeCodec())); /** * Convert a String into another String. @@ -42,6 +45,12 @@ * @return Converted String. * @throws UnsupportedEncodingException In case the specified encoding is not supported. */ - String code(String input, String charsetName) throws UnsupportedEncodingException; + @NotNull String code(@NotNull String input, @Nullable String charsetName) throws UnsupportedEncodingException; + /** + * Returns a display name for this Codec. + * @return A display name for this Codec. + */ + @Nullable String getDisplayName(); + } // interface StringCodec Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/URLEncodeCodec.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/URLEncodeCodec.java 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/URLEncodeCodec.java 2007-01-30 20:51:18 UTC (rev 322) @@ -21,17 +21,24 @@ import java.net.URLEncoder; import java.io.UnsupportedEncodingException; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; /** * A Codec which converts a String into a URLEncoded String. * @note When using this Codec, using UTF-8 is strongly recommended. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class URLEncodeCodec implements StringCodec { +public class URLEncodeCodec extends AbstractStringCodec { /** {@inheritDoc} */ - public String code(String input, String charsetName) throws UnsupportedEncodingException { + @NotNull public String code(@NotNull final String input, final String charsetName) throws UnsupportedEncodingException { return URLEncoder.encode(input, charsetName); } + /** {@inheritDoc} */ + @Nullable public String getDisplayName() { + return "URLEncode"; + } + } // clsas URLEncodeCodec Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/action.properties =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/action.properties 2007-01-30 20:48:22 UTC (rev 321) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/action.properties 2007-01-30 20:51:18 UTC (rev 322) @@ -70,4 +70,15 @@ license.1.title=String2Bytes license.1.file=COPYING license.2.title=japi-libs -license.2.file=LICENSE-japi-libs \ No newline at end of file +license.2.file=LICENSE-japi-libs + +availableCodecs.label=Available Codecs +selectedCodecs.label=Selected Codecs + +up.text=Up +down.text=Down +top.text=Top +bottom.text=Bottom + +add.text=Add -> +remove.text=<- Remove This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-30 20:49:16
|
Revision: 321 http://svn.sourceforge.net/japi/?rev=321&view=rev Author: christianhujer Date: 2007-01-30 12:48:22 -0800 (Tue, 30 Jan 2007) Log Message: ----------- Added copyright comment. Modified Paths: -------------- tools/string2bytes/trunk/build.xml Modified: tools/string2bytes/trunk/build.xml =================================================================== --- tools/string2bytes/trunk/build.xml 2007-01-20 23:29:09 UTC (rev 320) +++ tools/string2bytes/trunk/build.xml 2007-01-30 20:48:22 UTC (rev 321) @@ -1,4 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ String2Bytes is a program for converting Strings into byte arrays. + ~ Copyright (C) 2007 Christian Hujer + ~ + ~ This program is free software; you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation; either version 2 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along + ~ with this program; if not, write to the Free Software Foundation, Inc., + ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + --> + <project name="string2bytes" default="compile"> <property name="module.version" value="0.1" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-20 23:29:11
|
Revision: 320 http://svn.sourceforge.net/japi/?rev=320&view=rev Author: christianhujer Date: 2007-01-20 15:29:09 -0800 (Sat, 20 Jan 2007) Log Message: ----------- Unified @author tags. Removed some old @version tags. Modified Paths: -------------- libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java libs/swing-action/trunk/src/net/sf/japi/swing/ActionProvider.java libs/swing-action/trunk/src/net/sf/japi/swing/DisposeAction.java libs/swing-action/trunk/src/net/sf/japi/swing/DummyAction.java libs/swing-action/trunk/src/net/sf/japi/swing/IconManager.java libs/swing-action/trunk/src/net/sf/japi/swing/NamedActionMap.java libs/swing-action/trunk/src/net/sf/japi/swing/ReflectionAction.java libs/swing-action/trunk/src/net/sf/japi/swing/ToggleAction.java libs/swing-app/trunk/src/net/sf/japi/swing/app/CanLoad.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkManager.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferable.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTreeCellRenderer.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/Bookmarkable.java libs/swing-extlib/trunk/src/net/sf/japi/swing/VerticalFlowLayout.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontChooser.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyComboBox.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyListCellRenderer.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontPreview.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontStyleListCellRenderer.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.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/ActionMapNode.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionNode.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokePrefs.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeRootNode.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeTreeTableModel.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/SimpleNode.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/package-info.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JFileChooserButton.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JSAXErrorHandler.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/LocaleListCellRenderer.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/Progress.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/ProgressDisplay.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/AbstractPrefs.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesGroup.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesPane.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/Prefs.java libs/swing-proxyprefs/trunk/src/net/sf/japi/swing/prefs/proxy/ProxyPrefs.java libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/AbstractTreeTableModel.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModel.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTableModelAdapter.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTreeModelAdapter.java libs/util/trunk/src/net/sf/japi/util/Arrays2.java libs/util/trunk/src/net/sf/japi/util/Collections2.java libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java libs/util/trunk/src/net/sf/japi/util/EmptyIterator.java libs/util/trunk/src/net/sf/japi/util/EndianConverter.java libs/util/trunk/src/net/sf/japi/util/EnumerationIterator.java libs/util/trunk/src/net/sf/japi/util/IteratorEnumeration.java libs/util/trunk/src/net/sf/japi/util/LocaleComparator.java libs/util/trunk/src/net/sf/japi/util/NotNullIterator.java libs/util/trunk/src/net/sf/japi/util/ThrowableHandler.java libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForArray.java libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForIterable.java libs/util/trunk/src/net/sf/japi/util/filter/CollectionFilter.java libs/util/trunk/src/net/sf/japi/util/filter/Filter.java libs/util/trunk/src/net/sf/japi/util/filter/NotFilter.java libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForArray.java libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForIterable.java libs/util/trunk/src/net/sf/japi/util/filter/file/AbstractFileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/EndingFileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/Factory.java libs/util/trunk/src/net/sf/japi/util/filter/file/FileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/FilenameFileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/GlobFileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/RegexFileFilter.java libs/xml/trunk/src/net/sf/japi/xml/FilteredNodeList.java libs/xml/trunk/src/net/sf/japi/xml/NodeListIterator.java libs/xml/trunk/src/net/sf/japi/xml/package-info.java Modified: libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java =================================================================== --- libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,7 +26,7 @@ /** * An Iterator for iterating through the superclasses (subclasses to superclasses) of a class. * Note: The supplied class is included in iteration. If you want to omit it, you'll have to invoke getSuperclass() once, e.g. use <code>new SuperClassIterator(clazz.getSuperClass())</code> instead of <code>new SuperClassIterator(clazz)</code>. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class SuperClassIterator implements Iterator<Class<?>>, Iterable<Class<?>> { Modified: libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java 2007-01-20 23:29:09 UTC (rev 320) @@ -159,7 +159,7 @@ * @todo think about toolbar configuration * @todo eventually rename this ActionBuilder and provide an ActionBuilderFactory. * @todo whether a dialog is a onetime dialog should be a property and user configurable - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public final class ActionFactory { Modified: libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java 2007-01-20 23:29:09 UTC (rev 320) @@ -31,7 +31,7 @@ * {@link ActionFactory} in future will automatically configure and store Actions with properties for methods that are annotated with this Annotation. * In future, this Annotation might get some attributes, but currently it hasn't got any. * There is no guarantee for future attributes to be optional. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ @Documented @Inherited Modified: libs/swing-action/trunk/src/net/sf/japi/swing/ActionProvider.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/ActionProvider.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/ActionProvider.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable; /** Interface for classes that provide actions. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface ActionProvider { Modified: libs/swing-action/trunk/src/net/sf/japi/swing/DisposeAction.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/DisposeAction.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/DisposeAction.java 2007-01-20 23:29:09 UTC (rev 320) @@ -38,7 +38,7 @@ * </pre> * The convenience method {@link #install(JDialog)} will do exactly that for an existing JDialog. * @todo basically this is the same as using an ActionFactory with dispose as method, so why not use that? - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public final class DisposeAction extends AbstractAction { Modified: libs/swing-action/trunk/src/net/sf/japi/swing/DummyAction.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/DummyAction.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/DummyAction.java 2007-01-20 23:29:09 UTC (rev 320) @@ -27,7 +27,7 @@ * This is useful e.g. for JMenu, instances of which you can create using Action instances but where implementing the basic abstract method {@link * ActionListener#actionPerformed(ActionEvent)} does not make any sense. * This class is also an appropriate superclass for Action implementations that aren't interested in ActionEvents but other events. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public final class DummyAction extends AbstractAction { Modified: libs/swing-action/trunk/src/net/sf/japi/swing/IconManager.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/IconManager.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/IconManager.java 2007-01-20 23:29:09 UTC (rev 320) @@ -36,7 +36,7 @@ * Instances must have an associated ClassLoader, otherwise several methods will not work properly but throw a NullPointerException instead. * So if you do not provide a ClassLoader, be sure the class you provide has one, or if you use the no-arg constructor resp. the default instance, be * sure the IconManager class itself was loaded with some ClassLoader other than <code>null</code>. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo this class should be refactored into a more generic version and accessible through ActionFactory? * @todo it should be possible to initialize the paths through properties */ Modified: libs/swing-action/trunk/src/net/sf/japi/swing/NamedActionMap.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/NamedActionMap.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/NamedActionMap.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ import javax.swing.ActionMap; /** An ActionMap subclass which provides a (possibly localized) name. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class NamedActionMap extends ActionMap { Modified: libs/swing-action/trunk/src/net/sf/japi/swing/ReflectionAction.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/ReflectionAction.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/ReflectionAction.java 2007-01-20 23:29:09 UTC (rev 320) @@ -50,7 +50,7 @@ * <p /> * You can use {@link #REFLECTION_ARGUMENTS} for providing arguments for the action method that's called via Reflection. * Because that Object[] is not cloned, you can keep the reference and dynamically change the arguments of the invoked method. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo ReflectionAction should be able to invoke methods with parameters, three variants: Object..., ActionEvent or void */ public final class ReflectionAction extends AbstractAction { Modified: libs/swing-action/trunk/src/net/sf/japi/swing/ToggleAction.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/ToggleAction.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-action/trunk/src/net/sf/japi/swing/ToggleAction.java 2007-01-20 23:29:09 UTC (rev 320) @@ -34,7 +34,7 @@ /** The ToggleAction works similar as an ReflectionAction. * But it keeps track of the components. * Be sure to use its factory methodsA - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public final class ToggleAction extends AbstractAction { Modified: libs/swing-app/trunk/src/net/sf/japi/swing/app/CanLoad.java =================================================================== --- libs/swing-app/trunk/src/net/sf/japi/swing/app/CanLoad.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-app/trunk/src/net/sf/japi/swing/app/CanLoad.java 2007-01-20 23:29:09 UTC (rev 320) @@ -20,7 +20,7 @@ package net.sf.japi.swing.app; /** Interface to be implemented by classes that are able to load a URL. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface CanLoad { Modified: libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java =================================================================== --- libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -17,9 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - -// $Header: /cvsroot/japi/japi/src/app/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java,v 1.1 2006/03/26 01:26:25 christianhujer Exp $ - package net.sf.japi.swing.bookmarks; import java.awt.Point; @@ -34,7 +31,7 @@ import static net.sf.japi.swing.bookmarks.BookmarkTransferable.getBookmarkDataFlavor; /** Class for dropping a bookmark over a JTree managing bookmarks. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class BookmarkDropTargetAdapter extends DropTargetAdapter { 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-01-20 23:04:19 UTC (rev 319) +++ libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkManager.java 2007-01-20 23:29:09 UTC (rev 320) @@ -66,7 +66,7 @@ * <li>instanciate this class once for each gruop / kind of bookmarks you want to manage. Normally, one instance is enough per application</li> * <li>invoke {@link #createBookmarkMenu} to create your bookmarks menu</li> * </ul> - * @author $Author: christianhujer $ + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo documentation * @todo fix bookmark drag and drop indices * @todo think about serialization of Actions @@ -241,8 +241,7 @@ /** Class for a ControlPanel to manage the bookmarks. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @version $Id: BookmarkManager.java,v 1.2 2006/03/26 15:22:16 christianhujer Exp $ + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ private class ControlPanel extends JComponent { @@ -271,8 +270,7 @@ * <li>{@link BookmarkItem}s for normal Bookmarks with title and url</li> * <li>{@link BookmarkFolder}s for Folders within Bookmarks with a title and (possibly) contents</li> * </ul> - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @version $Id: BookmarkManager.java,v 1.2 2006/03/26 15:22:16 christianhujer Exp $ + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public static abstract class Bookmark extends AbstractAction implements MutableTreeNode { @@ -423,8 +421,7 @@ /** Class for Bookmark Separator. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @version $Id: BookmarkManager.java,v 1.2 2006/03/26 15:22:16 christianhujer Exp $ + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public static class BookmarkSeparator extends Bookmark { @@ -458,8 +455,7 @@ /** Class for Bookmark Items. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @version $Id: BookmarkManager.java,v 1.2 2006/03/26 15:22:16 christianhujer Exp $ + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class BookmarkItem extends Bookmark { @@ -524,8 +520,7 @@ /** Class for Bookmark folders. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @version $Id: BookmarkManager.java,v 1.2 2006/03/26 15:22:16 christianhujer Exp $ + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class BookmarkFolder extends Bookmark implements Iterable<Bookmark> { Modified: libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java =================================================================== --- libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,7 +26,7 @@ import javax.swing.TransferHandler; /** Class for DnD in Bookmarks displaying JTrees. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo improve implementation */ public class BookmarkTransferHandler extends TransferHandler { Modified: libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferable.java =================================================================== --- libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferable.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferable.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ import java.awt.datatransfer.Transferable; /** Class for transfering a bookmark through a clipboard or drag and drop. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class BookmarkTransferable implements Transferable { Modified: libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTreeCellRenderer.java =================================================================== --- libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTreeCellRenderer.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTreeCellRenderer.java 2007-01-20 23:29:09 UTC (rev 320) @@ -25,7 +25,7 @@ import javax.swing.tree.DefaultTreeCellRenderer; /** Class for rendering TreeCells in JTrees which manage Bookmarks. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo improve separator */ public class BookmarkTreeCellRenderer extends DefaultTreeCellRenderer { Modified: libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/Bookmarkable.java =================================================================== --- libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/Bookmarkable.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/Bookmarkable.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,7 +26,7 @@ * Implement this interface if your class provides information for creating bookmarks. * See the class {@link BookmarkManager} for more information on Bookmarks. * @see BookmarkManager - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface Bookmarkable extends CanLoad { Modified: libs/swing-extlib/trunk/src/net/sf/japi/swing/VerticalFlowLayout.java =================================================================== --- libs/swing-extlib/trunk/src/net/sf/japi/swing/VerticalFlowLayout.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-extlib/trunk/src/net/sf/japi/swing/VerticalFlowLayout.java 2007-01-20 23:29:09 UTC (rev 320) @@ -28,7 +28,7 @@ import org.jetbrains.annotations.NotNull; /** Layout similar to FlowLayout, but using columns (vertical layout) instead of rows (horizontal layout). - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ @SuppressWarnings({"NonPrivateFieldAccessedInSynchronizedContext", "FieldAccessedSynchronizedAndUnsynchronized"}) public class VerticalFlowLayout implements LayoutManager { Modified: libs/swing-font/trunk/src/net/sf/japi/swing/font/FontChooser.java =================================================================== --- libs/swing-font/trunk/src/net/sf/japi/swing/font/FontChooser.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-font/trunk/src/net/sf/japi/swing/font/FontChooser.java 2007-01-20 23:29:09 UTC (rev 320) @@ -56,7 +56,7 @@ * <li>You can use an instance of FontChooser as a Pane and add it to the desired Container.</li> * <li>You can use this class' static methods to display a Dialog which lets the user choose a font.</li> * </ul> - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class FontChooser extends JComponent implements ListSelectionListener, ChangeListener { Modified: libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyComboBox.java =================================================================== --- libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyComboBox.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyComboBox.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,8 +26,7 @@ import javax.swing.JComboBox; /** ComboBox to choose the font family. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @version $Id: FontFamilyComboBox.java,v 1.1 2006/03/26 01:26:27 christianhujer Exp $ + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class FontFamilyComboBox extends JComboBox { Modified: libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyListCellRenderer.java =================================================================== --- libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyListCellRenderer.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyListCellRenderer.java 2007-01-20 23:29:09 UTC (rev 320) @@ -27,8 +27,7 @@ /** List cell renderer for letting the user choose the font family. * This list cell renderer displays each font in its font. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @version $Id: FontFamilyListCellRenderer.java,v 1.1 2006/03/26 01:26:27 christianhujer Exp $ + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class FontFamilyListCellRenderer extends DefaultListCellRenderer { Modified: libs/swing-font/trunk/src/net/sf/japi/swing/font/FontPreview.java =================================================================== --- libs/swing-font/trunk/src/net/sf/japi/swing/font/FontPreview.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-font/trunk/src/net/sf/japi/swing/font/FontPreview.java 2007-01-20 23:29:09 UTC (rev 320) @@ -27,7 +27,7 @@ /** Font Preview. * Uses a localized text to display the font, but the user may edit the text to try out the characters she's interested in. * This class is derived from JTextField, but never ever depend on that inheritance. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class FontPreview extends JTextField { Modified: libs/swing-font/trunk/src/net/sf/japi/swing/font/FontStyleListCellRenderer.java =================================================================== --- libs/swing-font/trunk/src/net/sf/japi/swing/font/FontStyleListCellRenderer.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-font/trunk/src/net/sf/japi/swing/font/FontStyleListCellRenderer.java 2007-01-20 23:29:09 UTC (rev 320) @@ -29,7 +29,7 @@ import net.sf.japi.swing.ActionFactory; /** ListCellRenderer for font styles. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo improve performance */ public class FontStyleListCellRenderer extends DefaultListCellRenderer { Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ import org.jetbrains.annotations.Nullable; /** Base class for simple nodes. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public abstract class AbstractSimpleNode<C> implements SimpleNode<C> { 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-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionKeyDisplay.java 2007-01-20 23:29:09 UTC (rev 320) @@ -38,7 +38,7 @@ import net.sf.japi.swing.ActionFactory; /** A component for displaying the accellerators of an Action. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ // This class is only public to get the action methods working. public class ActionKeyDisplay extends JComponent { Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionMapNode.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionMapNode.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionMapNode.java 2007-01-20 23:29:09 UTC (rev 320) @@ -24,7 +24,7 @@ import net.sf.japi.swing.NamedActionMap; /** Node object for an ActionMap. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ class ActionMapNode extends AbstractSimpleNode<ActionNode> { Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionNode.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionNode.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionNode.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable; /** Node object for an Action. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ class ActionNode extends AbstractSimpleNode<SimpleNode> { Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokePrefs.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokePrefs.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokePrefs.java 2007-01-20 23:29:09 UTC (rev 320) @@ -31,7 +31,7 @@ /** Prefs implementation for configuring keystrokes of one or more {@link ActionFactory ActionFactories}. * TODO - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class KeyStrokePrefs extends AbstractPrefs implements ListSelectionListener { Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeRootNode.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeRootNode.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeRootNode.java 2007-01-20 23:29:09 UTC (rev 320) @@ -24,7 +24,7 @@ /** * TODO - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class KeyStrokeRootNode extends AbstractSimpleNode<ActionMapNode> { 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-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeTreeTableModel.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,7 +26,7 @@ /** * TODO - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class KeyStrokeTreeTableModel extends AbstractTreeTableModel<KeyStrokeRootNode, AbstractSimpleNode<AbstractSimpleNode>> { Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/SimpleNode.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/SimpleNode.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/SimpleNode.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ import org.jetbrains.annotations.Nullable; /** Interface for simple nodes. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ interface SimpleNode<C> { Modified: libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/package-info.java =================================================================== --- libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/package-info.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/package-info.java 2007-01-20 23:29:09 UTC (rev 320) @@ -19,6 +19,6 @@ /** * Keyboard preferences. - * @author <a href="mailto:ch...@ri...">Chrsitian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ package net.sf.japi.swing.prefs.keys; Modified: libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JFileChooserButton.java =================================================================== --- libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JFileChooserButton.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JFileChooserButton.java 2007-01-20 23:29:09 UTC (rev 320) @@ -28,7 +28,7 @@ import java.awt.Insets; /** JButton for choosing a file from hd. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class JFileChooserButton extends JButton { Modified: libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JSAXErrorHandler.java =================================================================== --- libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JSAXErrorHandler.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JSAXErrorHandler.java 2007-01-20 23:29:09 UTC (rev 320) @@ -32,7 +32,7 @@ /** Implementation of {@link ErrorHandler} for displaying XML parser errors on the screen. * @warning DO NOT RELY ON THE INHERITANCE! - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public final class JSAXErrorHandler extends JOptionPane implements ErrorHandler { Modified: libs/swing-misc/trunk/src/net/sf/japi/swing/misc/LocaleListCellRenderer.java =================================================================== --- libs/swing-misc/trunk/src/net/sf/japi/swing/misc/LocaleListCellRenderer.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-misc/trunk/src/net/sf/japi/swing/misc/LocaleListCellRenderer.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,7 +26,7 @@ import javax.swing.JLabel; /** Implementation of a ListCellRenderer that renders lists of {@link Locale} instances according to their names in the current default locale. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public final class LocaleListCellRenderer extends DefaultListCellRenderer { Modified: libs/swing-misc/trunk/src/net/sf/japi/swing/misc/Progress.java =================================================================== --- libs/swing-misc/trunk/src/net/sf/japi/swing/misc/Progress.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-misc/trunk/src/net/sf/japi/swing/misc/Progress.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ import java.awt.Component; /** Interface for classes that are able to display progress. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface Progress { Modified: libs/swing-misc/trunk/src/net/sf/japi/swing/misc/ProgressDisplay.java =================================================================== --- libs/swing-misc/trunk/src/net/sf/japi/swing/misc/ProgressDisplay.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-misc/trunk/src/net/sf/japi/swing/misc/ProgressDisplay.java 2007-01-20 23:29:09 UTC (rev 320) @@ -33,7 +33,7 @@ /** ProgressDisplay handles a popup dialog for the mainview * which displays a process progressBar. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public final class ProgressDisplay extends JDialog implements Progress { Modified: libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/AbstractPrefs.java =================================================================== --- libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/AbstractPrefs.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/AbstractPrefs.java 2007-01-20 23:29:09 UTC (rev 320) @@ -31,7 +31,7 @@ * Subclass this. * Build the panel in your constructor. * The default layout of an AbstractPrefs is {@link BoxLayout} with {@link BoxLayout#Y_AXIS}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public abstract class AbstractPrefs extends JPanel implements Prefs { Modified: libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesGroup.java =================================================================== --- libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesGroup.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesGroup.java 2007-01-20 23:29:09 UTC (rev 320) @@ -25,7 +25,7 @@ import javax.swing.AbstractListModel; /** A PreferencesGroup is an ordered set of {@link Prefs}, for use with {@link PreferencesPane}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class PreferencesGroup extends AbstractListModel implements Iterable<Prefs> { Modified: libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesPane.java =================================================================== --- libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesPane.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesPane.java 2007-01-20 23:29:09 UTC (rev 320) @@ -43,7 +43,7 @@ /** Panel to display preferences. * @serial exclude This class is not intended to be serialized. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"}) public final class PreferencesPane extends JOptionPane implements ListSelectionListener { Modified: libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/Prefs.java =================================================================== --- libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/Prefs.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/Prefs.java 2007-01-20 23:29:09 UTC (rev 320) @@ -28,7 +28,7 @@ * Often, implementations of this interface will subclass JComponent or JPanel. * In that case {@link #getEditComponent()} will <code>return this</code>. * {@link AbstractPrefs} provides a useful basic implementation of this interface. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface Prefs { Modified: libs/swing-proxyprefs/trunk/src/net/sf/japi/swing/prefs/proxy/ProxyPrefs.java =================================================================== --- libs/swing-proxyprefs/trunk/src/net/sf/japi/swing/prefs/proxy/ProxyPrefs.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-proxyprefs/trunk/src/net/sf/japi/swing/prefs/proxy/ProxyPrefs.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ import net.sf.japi.swing.prefs.AbstractPrefs; /** Proxy Configuration. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class ProxyPrefs extends AbstractPrefs { Modified: libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java =================================================================== --- libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java 2007-01-20 23:29:09 UTC (rev 320) @@ -74,7 +74,7 @@ * @fixme The preferences properties lastTipOfTheDayNumber and showTipOfTheDayAtStartup are stored in the wrong package, they must be stored in the client package instead of this package * @todo Allow parametrization of properties, e.g. via a String sequence like <code>${property.name}</code>, which should then be looked up using * a defined scheme from one or perhaps more definable {@link ActionFactory ActionFactories}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @serial exclude */ public final class TipOfTheDayManager extends JOptionPane { Modified: libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/AbstractTreeTableModel.java =================================================================== --- libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/AbstractTreeTableModel.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/AbstractTreeTableModel.java 2007-01-20 23:29:09 UTC (rev 320) @@ -24,7 +24,7 @@ import javax.swing.event.TreeModelListener; /** Abstract base implementation of TreeTableModel. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public abstract class AbstractTreeTableModel<R, T> implements TreeTableModel<R, T> { Modified: libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModel.java =================================================================== --- libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModel.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModel.java 2007-01-20 23:29:09 UTC (rev 320) @@ -29,7 +29,7 @@ * TreeTableModel myData = new MyTreeTableModel(); * JTreeTable treeTable = new JTreeTable(myData); * </pre> - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface TreeTableModel<R, T> { Modified: libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTableModelAdapter.java =================================================================== --- libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTableModelAdapter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTableModelAdapter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,7 +26,7 @@ import javax.swing.tree.TreePath; /** Wraps a TreeTableModel in a TableModel. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class TreeTableModelTableModelAdapter extends AbstractTableModel { @@ -88,7 +88,7 @@ } /** TreeExpansionListener for handling TreeExpansion events. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ private class MyTreeExpansionListener implements TreeExpansionListener { Modified: libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTreeModelAdapter.java =================================================================== --- libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTreeModelAdapter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTreeModelAdapter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,7 +26,7 @@ /** * TODO - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class TreeTableModelTreeModelAdapter<R, T> implements TreeModel { Modified: libs/util/trunk/src/net/sf/japi/util/Arrays2.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/Arrays2.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/Arrays2.java 2007-01-20 23:29:09 UTC (rev 320) @@ -30,7 +30,7 @@ /** This class provides some additional utility methods you might miss in {@link Arrays}. * It is named Arrays2 so you have no problems using both, this class and <code>java.util.Arrays</code> (no name conflict). - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @see Arrays */ public final class Arrays2 { Modified: libs/util/trunk/src/net/sf/japi/util/Collections2.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/Collections2.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/Collections2.java 2007-01-20 23:29:09 UTC (rev 320) @@ -30,7 +30,7 @@ /** This class provides some additional utility methods you might miss in {@link Collections}. * It is named Collections2 so you have no problems using both, this class and <code>java.util.Collections</code> (no name conflict). - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @see Collections */ public class Collections2 { Modified: libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ import java.util.NoSuchElementException; /** Empty Enumeration. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class EmptyEnumeration<E> implements Enumeration<E> { Modified: libs/util/trunk/src/net/sf/japi/util/EmptyIterator.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/EmptyIterator.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/EmptyIterator.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ import java.util.NoSuchElementException; /** An iterator that never returns elements and thus is always empty. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class EmptyIterator<T> implements Iterator<T> { Modified: libs/util/trunk/src/net/sf/japi/util/EndianConverter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/EndianConverter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/EndianConverter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ /** Class to convert data from little endian to big endian and vice versa. * Since the conversion is symmetric, there are no special conversion methods, just generic ones, e.g. the same method is used to convert a little * endian integer to a big endian integer and vice versa. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ @SuppressWarnings({"UtilityClass"}) public class EndianConverter { Modified: libs/util/trunk/src/net/sf/japi/util/EnumerationIterator.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/EnumerationIterator.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/EnumerationIterator.java 2007-01-20 23:29:09 UTC (rev 320) @@ -25,7 +25,7 @@ /** Combined Iterator/Iterable proxy for enumerations. * Instances are not reusable. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class EnumerationIterator<T> implements Iterable<T>, Iterator<T> { Modified: libs/util/trunk/src/net/sf/japi/util/IteratorEnumeration.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/IteratorEnumeration.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/IteratorEnumeration.java 2007-01-20 23:29:09 UTC (rev 320) @@ -24,7 +24,7 @@ /** Enumeration proxy for Iterators. * Instances are not reusable. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class IteratorEnumeration<T> implements Enumeration<T> { Modified: libs/util/trunk/src/net/sf/japi/util/LocaleComparator.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/LocaleComparator.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/LocaleComparator.java 2007-01-20 23:29:09 UTC (rev 320) @@ -25,7 +25,7 @@ /** Implementation of {@link Comparator} that is able to compare {@link Locale} instances by their names (allowing <code>null</code>). * The Locale for sorting the Locales is determined at creation time. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public final class LocaleComparator implements Comparator<Locale> { Modified: libs/util/trunk/src/net/sf/japi/util/NotNullIterator.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/NotNullIterator.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/NotNullIterator.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ import java.util.NoSuchElementException; /** Iterator / Iterable decorator that skips elements which are <code>null</code>. - * @author <a href="mailto:ch...@it...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class NotNullIterator<T> implements Iterator<T> { Modified: libs/util/trunk/src/net/sf/japi/util/ThrowableHandler.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/ThrowableHandler.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/ThrowableHandler.java 2007-01-20 23:29:09 UTC (rev 320) @@ -24,7 +24,7 @@ /** Interface that is implemented by classes that handle exceptions via callbacks. * This is useful during operations that can throw more than one exception during an operation. * Even more, when these exceptions eventually are more or less recoverable. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface ThrowableHandler<T extends Throwable> extends EventListener { Modified: libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForArray.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForArray.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForArray.java 2007-01-20 23:29:09 UTC (rev 320) @@ -20,7 +20,7 @@ package net.sf.japi.util.filter; /** A Filter used to AND-combine other filters given as array. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ final class AndFilterForArray<T> implements Filter<T> { Modified: libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForIterable.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForIterable.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForIterable.java 2007-01-20 23:29:09 UTC (rev 320) @@ -20,7 +20,7 @@ package net.sf.japi.util.filter; /** A Filter used to AND-combine other filters given as {@link Iterable}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ final class AndFilterForIterable<T> implements Filter<T> { Modified: libs/util/trunk/src/net/sf/japi/util/filter/CollectionFilter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/CollectionFilter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/CollectionFilter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ /** Filter for filtering elements that are contained in a collection. * Note: The collection is not cloned. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ @SuppressWarnings({"AssignmentToCollectionOrArrayFieldFromParameter"}) final class CollectionFilter<T> implements Filter<T> { Modified: libs/util/trunk/src/net/sf/japi/util/filter/Filter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/Filter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/Filter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ import java.util.Collection; /** This interface servers as a common interface for filters. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface Filter<T> { @@ -33,7 +33,7 @@ boolean accept(T o); /** Factory for useful filters. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ @SuppressWarnings({"StaticMethodNamingConvention", "UtilityClass", "InnerClassOfInterface"}) final class Factory { Modified: libs/util/trunk/src/net/sf/japi/util/filter/NotFilter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/NotFilter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/NotFilter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -20,7 +20,7 @@ package net.sf.japi.util.filter; /** A Filter that is the negation of another filter. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ final class NotFilter<T> implements Filter<T> { Modified: libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForArray.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForArray.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForArray.java 2007-01-20 23:29:09 UTC (rev 320) @@ -20,7 +20,7 @@ package net.sf.japi.util.filter; /** A Filter used to OR-combine other filters given as array. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ final class OrFilterForArray<T> implements Filter<T> { Modified: libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForIterable.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForIterable.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForIterable.java 2007-01-20 23:29:09 UTC (rev 320) @@ -20,7 +20,7 @@ package net.sf.japi.util.filter; /** A Filter used to OR-combine other filters given as {@link Iterable}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ final class OrFilterForIterable<T> implements Filter<T> { Modified: libs/util/trunk/src/net/sf/japi/util/filter/file/AbstractFileFilter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/file/AbstractFileFilter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/file/AbstractFileFilter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -20,7 +20,7 @@ package net.sf.japi.util.filter.file; /** A FileFilter that combines several File filtering classes and interfaces. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ @SuppressWarnings({"EmptyClass"}) public abstract class AbstractFileFilter extends javax.swing.filechooser.FileFilter implements FileFilter { Modified: libs/util/trunk/src/net/sf/japi/util/filter/file/EndingFileFilter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/file/EndingFileFilter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/file/EndingFileFilter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ import java.io.File; /** Swing FileFilter implementation that filters files with specified endings. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo find a convenient way for i18n/l10n of this class * @todo option to ignore case */ Modified: libs/util/trunk/src/net/sf/japi/util/filter/file/Factory.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/file/Factory.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/file/Factory.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ import net.sf.japi.util.filter.Filter; /** A factory for filters. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo check whether this class is complete * @todo check whether this class is required or instead {@link Filter.Factory} should be used */ Modified: libs/util/trunk/src/net/sf/japi/util/filter/file/FileFilter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/file/FileFilter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/file/FileFilter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -23,7 +23,7 @@ import net.sf.japi.util.filter.Filter; /** An interface that joins {@link java.io.FileFilter} with {@link Filter}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ // This class is intentionally named like one of its superclasses @SuppressWarnings({"ClassNameSameAsAncestorName"}) Modified: libs/util/trunk/src/net/sf/japi/util/filter/file/FilenameFileFilter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/file/FilenameFileFilter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/file/FilenameFileFilter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -22,7 +22,7 @@ import java.io.File; /** Swing FileFilter implementation that filters files with specified names. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @todo find a convenient way for i18n/l10n of this class */ public final class FilenameFileFilter extends AbstractFileFilter { Modified: libs/util/trunk/src/net/sf/japi/util/filter/file/GlobFileFilter.java =================================================================== --- libs/util/trunk/src/net/sf/japi/util/filter/file/GlobFileFilter.java 2007-01-20 23:04:19 UTC (rev 319) +++ libs/util/trunk/src/net/sf/japi/util/filter/file/GlobFileFilter.java 2007-01-20 23:29:09 UTC (rev 320) @@ -26,7 +26,7 @@ * <li><code>?</code> for... [truncated message content] |
From: <chr...@us...> - 2007-01-20 23:04:20
|
Revision: 319 http://svn.sourceforge.net/japi/?rev=319&view=rev Author: christianhujer Date: 2007-01-20 15:04:19 -0800 (Sat, 20 Jan 2007) Log Message: ----------- Updated copyrights. Changed package.html to package-info.java. Modified Paths: -------------- libs/argparser/trunk/build.xml libs/argparser/trunk/src/doc/examples/Cat.java libs/argparser/trunk/src/doc/examples/Head.java libs/argparser/trunk/src/doc/examples/Head.properties libs/argparser/trunk/src/doc/examples/Head_de.properties libs/argparser/trunk/src/doc/examples/Recode.java libs/argparser/trunk/src/doc/examples/Tail.java libs/argparser/trunk/src/doc/examples/Uniq.java libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java libs/argparser/trunk/src/net/sf/japi/io/args/Command.java libs/argparser/trunk/src/net/sf/japi/io/args/MissingArgumentException.java libs/argparser/trunk/src/net/sf/japi/io/args/Option.java libs/argparser/trunk/src/net/sf/japi/io/args/OptionType.java libs/argparser/trunk/src/net/sf/japi/io/args/RequiredOptionsMissingException.java libs/argparser/trunk/src/net/sf/japi/io/args/StringJoiner.java libs/argparser/trunk/src/net/sf/japi/io/args/TerminalException.java libs/argparser/trunk/src/net/sf/japi/io/args/UnknownOptionException.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/AbstractConverter.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/BooleanConverter.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.properties libs/argparser/trunk/src/net/sf/japi/io/args/converter/ConverterRegistry.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter_de.properties libs/argparser/trunk/src/net/sf/japi/io/args/converter/InputStreamConverter.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/IntegerConverter.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/NoConverterFoundException.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/OututStreamConverter.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/StringConverter.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java libs/argparser/trunk/src/net/sf/japi/io/args/messages.properties libs/argparser/trunk/src/net/sf/japi/io/args/messages_de.properties libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/BasicCommandTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/CommandDummy.java libs/argparser/trunk/src/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/OptionTypeTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/RequiredOptionsMissingExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/StringJoinerTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/TerminalExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java libs/lang/trunk/build.xml libs/lang/trunk/src/net/sf/japi/lang/SuperClassIterator.java libs/logging/trunk/src/net/sf/japi/log/LogConfigurationError.java libs/logging/trunk/src/net/sf/japi/log/LogEntry.java libs/logging/trunk/src/net/sf/japi/log/Logger.java libs/logging/trunk/src/net/sf/japi/log/LoggerFactory.java libs/logging/trunk/src/net/sf/japi/log/SimpleLogger.java libs/logging/trunk/src/net/sf/japi/log/StandardLogger.java libs/logging/trunk/src/net/sf/japi/log/def/Level.java libs/swing-about/trunk/build.xml libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java libs/swing-about/trunk/src/net/sf/japi/swing/about/action.properties libs/swing-action/trunk/build.xml libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java libs/swing-action/trunk/src/net/sf/japi/swing/ActionProvider.java libs/swing-action/trunk/src/net/sf/japi/swing/DisposeAction.java libs/swing-action/trunk/src/net/sf/japi/swing/DummyAction.java libs/swing-action/trunk/src/net/sf/japi/swing/IconManager.java libs/swing-action/trunk/src/net/sf/japi/swing/NamedActionMap.java libs/swing-action/trunk/src/net/sf/japi/swing/ReflectionAction.java libs/swing-action/trunk/src/net/sf/japi/swing/ToggleAction.java libs/swing-action/trunk/src/net/sf/japi/swing/action.properties libs/swing-action/trunk/src/net/sf/japi/swing/action_de.properties libs/swing-action/trunk/src/test/net/sf/japi/swing/ActionFactoryTest.java libs/swing-action/trunk/src/test/net/sf/japi/swing/ReflectionActionTest.java libs/swing-action/trunk/src/test/net/sf/japi/swing/action.properties libs/swing-app/trunk/src/net/sf/japi/swing/app/CanLoad.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkDropTargetAdapter.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkManager.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferHandler.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTransferable.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/BookmarkTreeCellRenderer.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/Bookmarkable.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/action.properties libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/action_de.properties libs/swing-extlib/trunk/build.xml libs/swing-extlib/trunk/src/net/sf/japi/swing/RowLayout.java libs/swing-extlib/trunk/src/net/sf/japi/swing/VerticalFlowLayout.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontChooser.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyComboBox.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontFamilyListCellRenderer.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontPreview.java libs/swing-font/trunk/src/net/sf/japi/swing/font/FontStyleListCellRenderer.java libs/swing-font/trunk/src/net/sf/japi/swing/font/action.properties libs/swing-font/trunk/src/net/sf/japi/swing/font/action_de.properties libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/AbstractSimpleNode.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/ActionMapNode.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/ActionNode.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokePrefs.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeRootNode.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/KeyStrokeTreeTableModel.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/SimpleNode.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/action.properties libs/swing-misc/trunk/build.xml libs/swing-misc/trunk/src/net/sf/japi/swing/misc/CollectionsListModel.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JFileChooserButton.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/JSAXErrorHandler.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/LocaleListCellRenderer.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/Progress.java libs/swing-misc/trunk/src/net/sf/japi/swing/misc/ProgressDisplay.java libs/swing-prefs/trunk/build.xml libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/AbstractPrefs.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesGroup.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/PreferencesPane.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/Prefs.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/action.properties libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/action_de.properties libs/swing-proxyprefs/trunk/src/net/sf/japi/swing/prefs/proxy/ProxyPrefs.java libs/swing-tod/trunk/build.xml libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action.properties libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action_de.properties libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/AbstractTreeTableModel.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/JTreeTable.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModel.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTableModelAdapter.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/TreeTableModelTreeModelAdapter.java libs/taglets/trunk/build.xml libs/taglets/trunk/src/doc/start.xhtml libs/taglets/trunk/src/net/sf/japi/taglets/BlockListTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/FixmeTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/InvariantTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/NoteTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/PostconditionTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/PreconditionTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/TodoTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/WarningTaglet.java libs/taglets/trunk/src/net/sf/japi/taglets/XxxTaglet.java libs/util/trunk/build.xml libs/util/trunk/src/net/sf/japi/util/Arrays2.java libs/util/trunk/src/net/sf/japi/util/Collections2.java libs/util/trunk/src/net/sf/japi/util/EmptyEnumeration.java libs/util/trunk/src/net/sf/japi/util/EmptyIterator.java libs/util/trunk/src/net/sf/japi/util/EndianConverter.java libs/util/trunk/src/net/sf/japi/util/EnumerationIterator.java libs/util/trunk/src/net/sf/japi/util/IteratorEnumeration.java libs/util/trunk/src/net/sf/japi/util/IteratorIterable.java libs/util/trunk/src/net/sf/japi/util/LocaleComparator.java libs/util/trunk/src/net/sf/japi/util/NotNullIterator.java libs/util/trunk/src/net/sf/japi/util/ThrowableHandler.java libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForArray.java libs/util/trunk/src/net/sf/japi/util/filter/AndFilterForIterable.java libs/util/trunk/src/net/sf/japi/util/filter/CollectionFilter.java libs/util/trunk/src/net/sf/japi/util/filter/Filter.java libs/util/trunk/src/net/sf/japi/util/filter/NotFilter.java libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForArray.java libs/util/trunk/src/net/sf/japi/util/filter/OrFilterForIterable.java libs/util/trunk/src/net/sf/japi/util/filter/file/AbstractFileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/EndingFileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/Factory.java libs/util/trunk/src/net/sf/japi/util/filter/file/FileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/FilenameFileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/GlobFileFilter.java libs/util/trunk/src/net/sf/japi/util/filter/file/RegexFileFilter.java libs/xml/trunk/build.xml libs/xml/trunk/src/net/sf/japi/xml/FilteredNodeList.java libs/xml/trunk/src/net/sf/japi/xml/NodeListIterator.java Added Paths: ----------- libs/logging/trunk/src/net/sf/japi/log/package-info.java libs/swing-action/trunk/src/net/sf/japi/swing/package-info.java libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/package-info.java libs/swing-font/trunk/src/net/sf/japi/swing/font/package-info.java libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/package-info.java libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/package-info.java libs/swing-proxyprefs/trunk/src/net/sf/japi/swing/prefs/proxy/package-info.java libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/package-info.java libs/util/trunk/src/net/sf/japi/util/filter/file/package-info.java libs/util/trunk/src/net/sf/japi/util/filter/package-info.java libs/xml/trunk/src/net/sf/japi/xml/package-info.java Removed Paths: ------------- libs/logging/trunk/src/net/sf/japi/log/package.html libs/swing-action/trunk/src/net/sf/japi/swing/package.html libs/swing-bookmarks/trunk/src/net/sf/japi/swing/bookmarks/package.html libs/swing-font/trunk/src/net/sf/japi/swing/font/package.html libs/swing-keyprefs/trunk/src/net/sf/japi/swing/prefs/keys/package.html libs/swing-prefs/trunk/src/net/sf/japi/swing/prefs/package.html libs/swing-proxyprefs/trunk/src/net/sf/japi/swing/prefs/proxy/package.html libs/swing-treetable/trunk/src/net/sf/japi/swing/treetable/package.html libs/util/trunk/src/net/sf/japi/util/filter/file/package.html libs/util/trunk/src/net/sf/japi/util/filter/package.html libs/xml/trunk/src/net/sf/japi/xml/package.html Modified: libs/argparser/trunk/build.xml =================================================================== --- libs/argparser/trunk/build.xml 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/build.xml 2007-01-20 23:04:19 UTC (rev 319) @@ -1,4 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ JAPI libs-argparser is a library for parsing command line arguments. + ~ Copyright (C) 2007 Christian Hujer. + ~ + ~ This library is free software; you can redistribute it and/or + ~ modify it under the terms of the GNU Lesser General Public + ~ License as published by the Free Software Foundation; either + ~ version 2.1 of the License, or (at your option) any later version. + ~ + ~ This library is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + ~ Lesser General Public License for more details. + ~ + ~ You should have received a copy of the GNU Lesser General Public + ~ License along with this library; if not, write to the Free Software + ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + --> + <project name="japi lib argparser" default="compile"> <property name="module.version" value="0.1" /> Modified: libs/argparser/trunk/src/doc/examples/Cat.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Cat.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/doc/examples/Cat.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package examples; import java.io.FileInputStream; Modified: libs/argparser/trunk/src/doc/examples/Head.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Head.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/doc/examples/Head.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package examples; import java.io.BufferedReader; Modified: libs/argparser/trunk/src/doc/examples/Head.properties =================================================================== --- libs/argparser/trunk/src/doc/examples/Head.properties 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/doc/examples/Head.properties 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +# +# JAPI libs-argparser is a library for parsing command line arguments. +# Copyright (C) 2007 Christian Hujer. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + net.sf.japi.io.args.OptionType.REQUIRED=required net.sf.japi.io.args.OptionType.OPTIONAL=optional net.sf.japi.io.args.OptionType.TERMINAL=terminal Modified: libs/argparser/trunk/src/doc/examples/Head_de.properties =================================================================== --- libs/argparser/trunk/src/doc/examples/Head_de.properties 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/doc/examples/Head_de.properties 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +# +# JAPI libs-argparser is a library for parsing command line arguments. +# Copyright (C) 2007 Christian Hujer. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + net.sf.japi.io.args.OptionType.REQUIRED=erforderlich net.sf.japi.io.args.OptionType.OPTIONAL=optional net.sf.japi.io.args.OptionType.TERMINAL=abbrechend Modified: libs/argparser/trunk/src/doc/examples/Recode.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Recode.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/doc/examples/Recode.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package examples; import java.io.File; Modified: libs/argparser/trunk/src/doc/examples/Tail.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Tail.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/doc/examples/Tail.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package examples; import java.io.BufferedInputStream; Modified: libs/argparser/trunk/src/doc/examples/Uniq.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Uniq.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/doc/examples/Uniq.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package examples; import net.sf.japi.io.args.BasicCommand; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,22 +1,20 @@ /* - * JAPI - (Yet another (hopefully) useful) Java API + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. * - * Copyright (C) 2006 Christian Hujer + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.sf.japi.io.args; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args; import java.lang.reflect.Method; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/Command.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/Command.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/Command.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,22 +1,20 @@ /* - * JAPI - (Yet another (hopefully) useful) Java API + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. * - * Copyright (C) 2006 Christian Hujer + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.sf.japi.io.args; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/MissingArgumentException.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/MissingArgumentException.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/MissingArgumentException.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args; import org.jetbrains.annotations.NotNull; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/Option.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/Option.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/Option.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,22 +1,20 @@ /* - * JAPI - (Yet another (hopefully) useful) Java API + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. * - * Copyright (C) 2006 Christian Hujer + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.sf.japi.io.args; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/OptionType.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/OptionType.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/OptionType.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,22 +1,20 @@ /* - * JAPI - (Yet another (hopefully) useful) Java API + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. * - * Copyright (C) 2006 Christian Hujer + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.sf.japi.io.args; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/RequiredOptionsMissingException.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/RequiredOptionsMissingException.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/RequiredOptionsMissingException.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,22 +1,20 @@ /* - * JAPI - (Yet another (hopefully) useful) Java API + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. * - * Copyright (C) 2006 Christian Hujer + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.sf.japi.io.args; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/StringJoiner.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/StringJoiner.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/StringJoiner.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args; import java.io.IOException; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/TerminalException.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/TerminalException.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/TerminalException.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,22 +1,20 @@ /* - * JAPI - (Yet another (hopefully) useful) Java API + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. * - * Copyright (C) 2006 Christian Hujer + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.sf.japi.io.args; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/UnknownOptionException.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/UnknownOptionException.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/UnknownOptionException.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,22 +1,20 @@ /* - * JAPI - (Yet another (hopefully) useful) Java API + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. * - * Copyright (C) 2006 Christian Hujer + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.sf.japi.io.args; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/AbstractConverter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/AbstractConverter.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/AbstractConverter.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; import java.util.Locale; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/BooleanConverter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/BooleanConverter.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/BooleanConverter.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; import org.jetbrains.annotations.NotNull; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; import java.util.Locale; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.properties =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.properties 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.properties 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +# +# JAPI libs-argparser is a library for parsing command line arguments. +# Copyright (C) 2007 Christian Hujer. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + java.io.InputStream.displayName=uri|filename|- java.io.InputStream.description=Input file (URI, filename or - for STDIN). java.io.OutputStream.displayName=filename|- Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/ConverterRegistry.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/ConverterRegistry.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/ConverterRegistry.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; import java.util.HashMap; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter_de.properties =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter_de.properties 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter_de.properties 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +# +# JAPI libs-argparser is a library for parsing command line arguments. +# Copyright (C) 2007 Christian Hujer. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + java.io.InputStream.description=Eingabedatei (als URI, Dateiname oder - f\xFCr STDIN). java.io.OutputStream.description=Ausgabedatei (Dateiname oder - f\xFCr STDOUT). java.lang.Boolean.description=G\xFCltige Werte: {0} f\xFCr wahr und {1} f\xFCr falsch. Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/InputStreamConverter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/InputStreamConverter.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/InputStreamConverter.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; import java.io.FileInputStream; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/IntegerConverter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/IntegerConverter.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/IntegerConverter.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; import org.jetbrains.annotations.NotNull; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/NoConverterFoundException.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/NoConverterFoundException.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/NoConverterFoundException.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; /** Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/OututStreamConverter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/OututStreamConverter.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/OututStreamConverter.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; import java.io.File; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/StringConverter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/StringConverter.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/StringConverter.java 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.sf.japi.io.args.converter; import org.jetbrains.annotations.NotNull; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java 2007-01-20 23:04:19 UTC (rev 319) @@ -21,5 +21,6 @@ * The Converter package contains classes for automatic argument conversion. * For instance, a Command might simply want to read bytes from an InputStream. * The Converter package makes will convert the String into an InputStream then. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ package net.sf.japi.io.args.conveter; Modified: libs/argparser/trunk/src/net/sf/japi/io/args/messages.properties =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/messages.properties 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/messages.properties 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +# +# JAPI libs-argparser is a library for parsing command line arguments. +# Copyright (C) 2007 Christian Hujer. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + net.sf.japi.io.args.OptionType.REQUIRED=required net.sf.japi.io.args.OptionType.REQUIRED.description=required net.sf.japi.io.args.OptionType.OPTIONAL=optional Modified: libs/argparser/trunk/src/net/sf/japi/io/args/messages_de.properties =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/messages_de.properties 2007-01-20 22:40:12 UTC (rev 318) +++ libs/argparser/trunk/src/net/sf/japi/io/args/messages_de.properties 2007-01-20 23:04:19 UTC (rev 319) @@ -1,3 +1,22 @@ +# +# JAPI libs-argparser is a library for parsing command line arguments. +# Copyright (C) 2007 Christian Hujer. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + net.sf.japi.io.args.OptionType.... [truncated message content] |
From: <chr...@us...> - 2007-01-20 22:40:13
|
Revision: 318 http://svn.sourceforge.net/japi/?rev=318&view=rev Author: christianhujer Date: 2007-01-20 14:40:12 -0800 (Sat, 20 Jan 2007) Log Message: ----------- Added constructor that creates a new ActionFactory for a key (bundle). This might be useful for developing SDI applications or per-document actions in MDI applications. Modified Paths: -------------- libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java Modified: libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java 2007-01-20 14:49:57 UTC (rev 317) +++ libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java 2007-01-20 22:40:12 UTC (rev 318) @@ -206,14 +206,8 @@ @NotNull public static ActionFactory getFactory(@Nullable final String key) { ActionFactory factory = FACTORIES.get(key); if (factory == null) { - factory = new ActionFactory(); + factory = new ActionFactory(key); FACTORIES.put(key, factory); - try { - factory.addBundle(key + ".action"); - } catch (final MissingResourceException e) { - /* ignore */ - } - // eventually initialize factory here } return factory; } @@ -307,6 +301,21 @@ public ActionFactory() { } + /** + * Create an ActionFactory. + * Usually you wouldn't create an ActionFactory yourself but use {@link #getFactory(String)} for recycling ActionFactories and profit of easy + * access to the same ActionFactory from within the whole application without passing around ActionFactory references. + * Use this constructor if you explicitely need a new ActionFactory that doesn't share information (especially the action cache) with other ActionFactory instances. + * @param key name of ActionFactory. + */ + public ActionFactory(final String key) { + try { + addBundle(key + ".action"); + } catch (final MissingResourceException e) { + /* ignore */ + } + } + /** Get the ActionMap. * @return ActionMap */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-20 14:49:58
|
Revision: 317 http://svn.sourceforge.net/japi/?rev=317&view=rev Author: christianhujer Date: 2007-01-20 06:49:57 -0800 (Sat, 20 Jan 2007) Log Message: ----------- Corrected ActionFactory package. Modified Paths: -------------- libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java Modified: libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java =================================================================== --- libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java 2007-01-20 14:44:32 UTC (rev 316) +++ libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java 2007-01-20 14:49:57 UTC (rev 317) @@ -81,7 +81,7 @@ public final class TipOfTheDayManager extends JOptionPane { /** Action Factory. */ - private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.japi.swing"); + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.japi.swing.tod"); /** Random number generator for random tods. */ private static final Random RND = new Random(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-20 14:44:34
|
Revision: 316 http://svn.sourceforge.net/japi/?rev=316&view=rev Author: christianhujer Date: 2007-01-20 06:44:32 -0800 (Sat, 20 Jan 2007) Log Message: ----------- Work around a bug in some Java debuggers that won't load two files with the same path from different jars by moving tod to a package of its own. Added Paths: ----------- libs/swing-tod/trunk/src/net/sf/japi/swing/tod/ libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action.properties libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action_de.properties Removed Paths: ------------- libs/swing-tod/trunk/src/net/sf/japi/swing/TipOfTheDayManager.java libs/swing-tod/trunk/src/net/sf/japi/swing/action.properties libs/swing-tod/trunk/src/net/sf/japi/swing/action_de.properties Deleted: libs/swing-tod/trunk/src/net/sf/japi/swing/TipOfTheDayManager.java =================================================================== --- libs/swing-tod/trunk/src/net/sf/japi/swing/TipOfTheDayManager.java 2007-01-19 23:55:54 UTC (rev 315) +++ libs/swing-tod/trunk/src/net/sf/japi/swing/TipOfTheDayManager.java 2007-01-20 14:44:32 UTC (rev 316) @@ -1,331 +0,0 @@ -/* JAPI - (Yet another (hopefully) useful) Java API - * - * Copyright (C) 2004-2006 Christian Hujer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -package net.sf.japi.swing; - -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Font; -import java.util.ArrayList; -import java.util.List; -import java.util.MissingResourceException; -import java.util.Random; -import java.util.ResourceBundle; -import static java.util.ResourceBundle.getBundle; -import java.util.prefs.Preferences; -import static java.util.prefs.Preferences.userNodeForPackage; -import java.io.InputStream; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.security.PrivilegedAction; -import java.security.AccessController; -import javax.swing.Action; -import static javax.swing.Action.ACCELERATOR_KEY; -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JDialog; -import javax.swing.JEditorPane; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JScrollPane; -import javax.swing.KeyStroke; -import static javax.swing.SwingConstants.TRAILING; -import org.jetbrains.annotations.Nullable; -import static net.sf.japi.swing.ActionFactory.ACCELERATOR_KEY_2; -import static net.sf.japi.swing.IconManager.getDefaultIconManager; - -/** Class that manages tips of the day. - * The tips of the day are read from a property file. - * The name of the property file is tried to retrieve in exactly the following order: - * <ol> - * <li>The System Property <code>net.sf.japi.swing.tod</code> is queried and taken as a ResourceBundle base name.</li> - * <li>The Service file <code>META-INF/services/net.sf.japi.swing.tod</code> is read and its first line taken as a ResourceBundle base name.</li> - * </ol> - * If both fails, the behaviour is undefined. - * <p/> - * Setting the ResourceBundle for the TipOfTheDayManager via services is the preferred way, because you do not need any additional coding apart from - * invoking the TipOfTheDayManager somewhere at startup. - * <p /> - * The format of that property file follows the normal Java Properties convention, with the property keys being numbered, starting at "tod.text.1". - * Example: - * <pre># Tip Of The Days, English Version - * tod.text.1=<html>For analysis with other tools you can export the symbol map to XML, MS-Excel and CSV. - * tod.text.2=<html>For analysis with other tools you can export the mapping map to XML, MS-Excel and CSV. - * tod.text.3=<html>The supported map file formats are: Intel, GCC and MSVC. - * </pre> - * @fixme The preferences properties lastTipOfTheDayNumber and showTipOfTheDayAtStartup are stored in the wrong package, they must be stored in the client package instead of this package - * @todo Allow parametrization of properties, e.g. via a String sequence like <code>${property.name}</code>, which should then be looked up using - * a defined scheme from one or perhaps more definable {@link ActionFactory ActionFactories}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @serial exclude - */ -public final class TipOfTheDayManager extends JOptionPane { - - /** Action Factory. */ - private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.japi.swing"); - - /** Random number generator for random tods. */ - private static final Random RND = new Random(); - - /** Preferences. */ - private static final Preferences PREFS = userNodeForPackage(TipOfTheDayManager.class); - - /** The Action keys used for accelerators. */ - private static final String[] ACCELERATOR_KEYS = new String[] { ACCELERATOR_KEY, ACCELERATOR_KEY_2 }; - - /** The static instance. */ - private static final TipOfTheDayManager INSTANCE = new TipOfTheDayManager(); - - /** JButton for close. */ - private JButton closeButton; - - /** JDialog. */ - private JDialog dialog; - - /** JCheckBox for showing at startup. */ - private JCheckBox showAtStartup = new JCheckBox(ACTION_FACTORY.createAction(false, "todShowAtStartup", null)); - - /** The JLabel showing the current number of the tod. */ - private JLabel currentTodIndex = new JLabel(); - - /** The JEditorPane displaying the tod text. */ - private JEditorPane todText = new JEditorPane("text/html", ""); - - /** List with tod texts. */ - private List<String> todTexts = new ArrayList<String>(); - - /** Number of current Tip of the day. - * In visible state, the index must range between 0 and the number of tods available - 1, inclusive. - */ - private int todIndex; - - /** Show Tip Of The Day at startup. - * This method is only a proxy for show(Component) but looks at user preferences. - * If the user chose not to see TipOfTheDays this method simply returns. - * @param parentComponent the parent component of this dialog. - */ - public static void showAtStartup(final Component parentComponent) { - if (PREFS.getBoolean("showTipOfTheDayAtStartup", true)) { - show(parentComponent); - } - } - - /** Show a Tip Of The Day. - * @param parentComponent the parent component of this dialog. - */ - public static void show(final Component parentComponent) { - if (INSTANCE.dialog == null) { - INSTANCE.dialog = INSTANCE.createDialog(parentComponent, ACTION_FACTORY.getString("tipOfTheDay.windowTitle")); - } - INSTANCE.dialog.getRootPane().setDefaultButton(INSTANCE.closeButton); - INSTANCE.dialog.setModal(false); - INSTANCE.dialog.setResizable(true); - INSTANCE.dialog.setVisible(true); - INSTANCE.closeButton.requestFocusInWindow(); - } - - /** Finds the bundle name. - * @return bundle name - */ - private static String getBundleName() { - String bundleName = System.getProperty("net.sf.japi.swing.tod"); - if (bundleName == null) { - bundleName = getServiceValue(getClassLoader()); - } - return bundleName; - } - - /** This method attempts to return the first line of the resource META_INF/services/net.sf.japi.swing.tod from the provided ClassLoader. - * @param classLoader ClassLoader, may not be <code>null</code>. - * @return first line of resource, or <code>null</code> - */ - @Nullable private static String getServiceValue(final ClassLoader classLoader) { - BufferedReader rd = null; - try { - final String serviceId = "META-INF/services/net.sf.japi.swing.tod"; - final InputStream in = getResourceAsStream(classLoader, serviceId); - if (in != null) { - try { - rd = new BufferedReader(new InputStreamReader(in, "UTF-8")); - } catch (final UnsupportedEncodingException e) { - rd = new BufferedReader(new InputStreamReader(in)); - } - return rd.readLine(); - } - } catch (final Exception e) { - /* ignore. */ - } finally { - try { rd.close(); } catch (final Exception e) { /* ignore */ } finally { rd = null; } - } - return null; - } - - /** Get a resource from a classloader as stream. - * @param classLoader ClassLoader to get resource from - * @param serviceId service file to get stream from - * @return stream for resource <var>serviceId</var> in <var>classLoader</var> - */ - private static InputStream getResourceAsStream(final ClassLoader classLoader, final String serviceId) { - return AccessController.doPrivileged(new PrivilegedAction<InputStream>() { - - /** {@inheritDoc} */ - public InputStream run() { - return classLoader == null ? - ClassLoader.getSystemResourceAsStream(serviceId) : - classLoader.getResourceAsStream(serviceId); - } - - }); - } - - /** Get the ClassLoader. - * @return ClassLoader - */ - private static ClassLoader getClassLoader() { - try { - final ClassLoader contextClassLoader = getContextClassLoader(); - if (contextClassLoader != null) { - return contextClassLoader; - } - } catch (final Exception e) { - /* ignore */ - } - return TipOfTheDayManager.class.getClassLoader(); - } - - /** Get the context ClassLoader. - * @return context ClassLoader - */ - private static ClassLoader getContextClassLoader() { - return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() { - - /** {@inheritDoc} */ - @Nullable public ClassLoader run() { - try { - return Thread.currentThread().getContextClassLoader(); - } catch (final SecurityException ex) { - return null; - } - } - - }); - } - - /** Constructor. */ - private TipOfTheDayManager() { - final String[] keys = { "todPrev", "todRand", "todNext", "todClose" }; - final Action[] actions = new Action[keys.length]; - final Object[] newOptions = new Object[keys.length]; - for (int i = 0; i < keys.length; i++) { - actions[i] = ACTION_FACTORY.createAction(false, keys[i], this); - newOptions[i] = new JButton(actions[i]); - if ("todClose".equals(keys[i])) { - closeButton = (JButton) newOptions[i]; - } - for (final String key : ACCELERATOR_KEYS) { - final KeyStroke ks = (KeyStroke) actions[i].getValue(key); - if (ks != null) { - getInputMap(WHEN_IN_FOCUSED_WINDOW).put(ks, keys[i]); - getActionMap().put(keys[i], actions[i]); - } - } - } - final Dimension size = new Dimension(512, 128); - showAtStartup.setSelected(PREFS.getBoolean("showTipOfTheDayAtStartup", true)); - final JScrollPane todTextScroller = new JScrollPane(todText); - todTextScroller.setMinimumSize(size); - todTextScroller.setPreferredSize(size); - todTextScroller.setFocusable(true); - todTextScroller.setAutoscrolls(true); - todText.setEditable(false); - todText.setRequestFocusEnabled(false); - currentTodIndex.setHorizontalAlignment(TRAILING); - loadTodTexts(); - setTodIndex(PREFS.getInt("lastTipOfTheDayNumber", -1) + 1); - setIcon(getDefaultIconManager().getIcon(ACTION_FACTORY.getString("tipOfTheDay.icon"))); - final JLabel heading = new JLabel(ACTION_FACTORY.getString("todHeading")); - final Font oldFont = heading.getFont(); - heading.setFont(oldFont.deriveFont((float) (oldFont.getSize2D() * 1.5))); - setMessage(new Object[] { heading, todTextScroller, currentTodIndex, showAtStartup }); - setMessageType(INFORMATION_MESSAGE); - setOptions(newOptions); - } - - /** Loads the Tip of the day texts. */ - private void loadTodTexts() { - final ResourceBundle todBundle = getBundle(getBundleName()); - for (int i = 1;; i++) { - try { - todTexts.add(todBundle.getString(new StringBuilder().append("tod.text.").append(i).toString())); - } catch (final MissingResourceException e) { - break; - } - } - } - - /** Sets the tod index. - * @param todIndex new todIndex - */ - private void setTodIndex(final int todIndex) { - try { - this.todIndex = (todIndex + todTexts.size()) % todTexts.size(); - todText.setText(todTexts.get(this.todIndex)); - currentTodIndex.setText(ACTION_FACTORY.format("todIndex", this.todIndex + 1, todTexts.size())); - } catch (final ArithmeticException e) { - todText.setText(ACTION_FACTORY.getString("todsUnavailable")); - currentTodIndex.setText(""); - } - } - - /** Returns number of current Tip of the day. - * In visible state, the index must range between 0 and the number of tods available - 1, inclusive. - * @return number of current Tip of the day. - */ - public int getTodIndex() { - return todIndex; - } - - /** Action method for close. */ - public void todClose() { - setValue(closeButton); - PREFS.putBoolean("showTipOfTheDayAtStartup", showAtStartup.isSelected()); - PREFS.putInt("lastTipOfTheDayNumber", todIndex); - dialog.setVisible(false); - dialog.dispose(); - dialog = null; - } - - /** Action method for next. */ - public void todNext() { - setTodIndex(todIndex + 1); - } - - /** Action method for previous. */ - public void todPrev() { - setTodIndex(todIndex - 1); - } - - /** Action method for random. */ - public void todRand() { - setTodIndex(RND.nextInt(todTexts.size())); - } - -} // class TipOfTheDayManager Deleted: libs/swing-tod/trunk/src/net/sf/japi/swing/action.properties =================================================================== --- libs/swing-tod/trunk/src/net/sf/japi/swing/action.properties 2007-01-19 23:55:54 UTC (rev 315) +++ libs/swing-tod/trunk/src/net/sf/japi/swing/action.properties 2007-01-20 14:44:32 UTC (rev 316) @@ -1,56 +0,0 @@ -# JAPI - (Yet another (hopefully) useful) Java API -# -# Copyright (C) 2004-2006 Christian Hujer -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# - - -todPrev.text=Previous -todPrev.mnemonic=P -todPrev.accel=P -todPrev.accel2=LEFT -todPrev.icon=navigation/Back16 -todPrev.shortdescription=Displays the previous Tip Of The Day. -todNext.text=Next -todNext.mnemonic=N -todNext.accel=N -todNext.accel2=RIGHT -todNext.icon=navigation/Forward16 -todNext.shortdescription=Displays the next Tip Of The Day. -todRand.text=Random -todRand.mnemonic=R -todRand.accel=R -todRand.shortdescription=Displays a random Tip Of The Day. -todClose.mnemonic=C -todClose.accel=C -todClose.text=Close -todClose.shortdescription=Closes the Tip Of The Day window. -tipOfTheDay.icon=general/TipOfTheDay24 -todShowAtStartup.text=Show Tip Of The Day at startup -todShowAtStartup.mnemonic=S -todShowAtStartup.shortdescription=<html>If checked, a Tip Of The Day will be shown at application startup.<br>If unchecked, a Tip Of The Day will only be shown on demand. -tipOfTheDay.windowTitle=Tip Of The Day -todsUnavailable=No Tips Of The Day available -todHeading=Did you know? -todIndex=Showing Tip Of The Day {0} of {1}. -optionsChooseFile.icon=general/Open16 -saxErrorClear.text=Clear -saxErrorClose.text=Close -saxError.title=XML Errors -dialogDontShowAgain=Show this dialog again next time. -laf=Look and Feel -ReflectionAction.nonPublicMethod=Action Methods must be accessible public. That means the declaring class as well as the method must be public.\n{0} \ No newline at end of file Deleted: libs/swing-tod/trunk/src/net/sf/japi/swing/action_de.properties =================================================================== --- libs/swing-tod/trunk/src/net/sf/japi/swing/action_de.properties 2007-01-19 23:55:54 UTC (rev 315) +++ libs/swing-tod/trunk/src/net/sf/japi/swing/action_de.properties 2007-01-20 14:44:32 UTC (rev 316) @@ -1,48 +0,0 @@ -# JAPI - (Yet another (hopefully) useful) Java API -# -# Copyright (C) 2004-2006 Christian Hujer -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# - - -todPrev.text=Vorheriger -todPrev.mnemonic=V -todPrev.accel=V -todPrev.shortdescription=Zeigt den vorherigen Tipp des Tages. -todNext.text=N\xE4chster -todNext.mnemonic=N -todNext.accel=N -todNext.shortdescription=Zeigt den n\xE4chsten Tipp des Tages. -todRand.text=Zuf\xE4llig -todRand.mnemonic=R -todRand.accel=R -todRand.shortdescription=Zeigt einen zuf\xE4lligen Tipp des Tages. -todClose.mnemonic=S -todClose.accel=S -todClose.text=Schlie\xDFen -todClose.shortdescription=Schlie\xDFt das Tipp des Tages Fenster. -todShowAtStartup.text=Tipp des Tages beim Start anzeigen -todShowAtStartup.mnemonic=S -todShowAtStartup.shortdescription=<html>Wenn aktiviert, wird ein Tipp des Tages automatisch bei Programmstart angezeigt.<br>Wenn nicht aktiviert, werden Tipps des Tages nur auf ausdr\xFCcklichen Wunsch angezeigt. -tipOfTheDay.windowTitle=Tipp des Tages -todsUnavailable=Keine Tipps des Tages verf\xFCgbar -todHeading=Wussten Sie schon? -todIndex=Zeige Tipp des Tages {0} aus {1}. -dialogDontShowAgain=Show this dialog again next time. -saxError.title=XML Fehler -saxErrorClear.text=L\xF6schen -saxErrorClose.text=Schlie\xDFen Copied: libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java (from rev 315, libs/swing-tod/trunk/src/net/sf/japi/swing/TipOfTheDayManager.java) =================================================================== --- libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java (rev 0) +++ libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java 2007-01-20 14:44:32 UTC (rev 316) @@ -0,0 +1,332 @@ +/* JAPI - (Yet another (hopefully) useful) Java API + * + * Copyright (C) 2004-2006 Christian Hujer + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +package net.sf.japi.swing.tod; + +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.util.ArrayList; +import java.util.List; +import java.util.MissingResourceException; +import java.util.Random; +import java.util.ResourceBundle; +import static java.util.ResourceBundle.getBundle; +import java.util.prefs.Preferences; +import static java.util.prefs.Preferences.userNodeForPackage; +import java.io.InputStream; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.security.PrivilegedAction; +import java.security.AccessController; +import javax.swing.Action; +import static javax.swing.Action.ACCELERATOR_KEY; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JDialog; +import javax.swing.JEditorPane; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JScrollPane; +import javax.swing.KeyStroke; +import static javax.swing.SwingConstants.TRAILING; +import org.jetbrains.annotations.Nullable; +import static net.sf.japi.swing.ActionFactory.ACCELERATOR_KEY_2; +import static net.sf.japi.swing.IconManager.getDefaultIconManager; +import net.sf.japi.swing.ActionFactory; + +/** Class that manages tips of the day. + * The tips of the day are read from a property file. + * The name of the property file is tried to retrieve in exactly the following order: + * <ol> + * <li>The System Property <code>net.sf.japi.swing.tod</code> is queried and taken as a ResourceBundle base name.</li> + * <li>The Service file <code>META-INF/services/net.sf.japi.swing.tod</code> is read and its first line taken as a ResourceBundle base name.</li> + * </ol> + * If both fails, the behaviour is undefined. + * <p/> + * Setting the ResourceBundle for the TipOfTheDayManager via services is the preferred way, because you do not need any additional coding apart from + * invoking the TipOfTheDayManager somewhere at startup. + * <p /> + * The format of that property file follows the normal Java Properties convention, with the property keys being numbered, starting at "tod.text.1". + * Example: + * <pre># Tip Of The Days, English Version + * tod.text.1=<html>For analysis with other tools you can export the symbol map to XML, MS-Excel and CSV. + * tod.text.2=<html>For analysis with other tools you can export the mapping map to XML, MS-Excel and CSV. + * tod.text.3=<html>The supported map file formats are: Intel, GCC and MSVC. + * </pre> + * @fixme The preferences properties lastTipOfTheDayNumber and showTipOfTheDayAtStartup are stored in the wrong package, they must be stored in the client package instead of this package + * @todo Allow parametrization of properties, e.g. via a String sequence like <code>${property.name}</code>, which should then be looked up using + * a defined scheme from one or perhaps more definable {@link ActionFactory ActionFactories}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @serial exclude + */ +public final class TipOfTheDayManager extends JOptionPane { + + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.japi.swing"); + + /** Random number generator for random tods. */ + private static final Random RND = new Random(); + + /** Preferences. */ + private static final Preferences PREFS = userNodeForPackage(TipOfTheDayManager.class); + + /** The Action keys used for accelerators. */ + private static final String[] ACCELERATOR_KEYS = new String[] { ACCELERATOR_KEY, ACCELERATOR_KEY_2 }; + + /** The static instance. */ + private static final TipOfTheDayManager INSTANCE = new TipOfTheDayManager(); + + /** JButton for close. */ + private JButton closeButton; + + /** JDialog. */ + private JDialog dialog; + + /** JCheckBox for showing at startup. */ + private JCheckBox showAtStartup = new JCheckBox(ACTION_FACTORY.createAction(false, "todShowAtStartup", null)); + + /** The JLabel showing the current number of the tod. */ + private JLabel currentTodIndex = new JLabel(); + + /** The JEditorPane displaying the tod text. */ + private JEditorPane todText = new JEditorPane("text/html", ""); + + /** List with tod texts. */ + private List<String> todTexts = new ArrayList<String>(); + + /** Number of current Tip of the day. + * In visible state, the index must range between 0 and the number of tods available - 1, inclusive. + */ + private int todIndex; + + /** Show Tip Of The Day at startup. + * This method is only a proxy for show(Component) but looks at user preferences. + * If the user chose not to see TipOfTheDays this method simply returns. + * @param parentComponent the parent component of this dialog. + */ + public static void showAtStartup(final Component parentComponent) { + if (PREFS.getBoolean("showTipOfTheDayAtStartup", true)) { + show(parentComponent); + } + } + + /** Show a Tip Of The Day. + * @param parentComponent the parent component of this dialog. + */ + public static void show(final Component parentComponent) { + if (INSTANCE.dialog == null) { + INSTANCE.dialog = INSTANCE.createDialog(parentComponent, ACTION_FACTORY.getString("tipOfTheDay.windowTitle")); + } + INSTANCE.dialog.getRootPane().setDefaultButton(INSTANCE.closeButton); + INSTANCE.dialog.setModal(false); + INSTANCE.dialog.setResizable(true); + INSTANCE.dialog.setVisible(true); + INSTANCE.closeButton.requestFocusInWindow(); + } + + /** Finds the bundle name. + * @return bundle name + */ + private static String getBundleName() { + String bundleName = System.getProperty("net.sf.japi.swing.tod"); + if (bundleName == null) { + bundleName = getServiceValue(getClassLoader()); + } + return bundleName; + } + + /** This method attempts to return the first line of the resource META_INF/services/net.sf.japi.swing.tod from the provided ClassLoader. + * @param classLoader ClassLoader, may not be <code>null</code>. + * @return first line of resource, or <code>null</code> + */ + @Nullable private static String getServiceValue(final ClassLoader classLoader) { + BufferedReader rd = null; + try { + final String serviceId = "META-INF/services/net.sf.japi.swing.tod"; + final InputStream in = getResourceAsStream(classLoader, serviceId); + if (in != null) { + try { + rd = new BufferedReader(new InputStreamReader(in, "UTF-8")); + } catch (final UnsupportedEncodingException e) { + rd = new BufferedReader(new InputStreamReader(in)); + } + return rd.readLine(); + } + } catch (final Exception e) { + /* ignore. */ + } finally { + try { rd.close(); } catch (final Exception e) { /* ignore */ } finally { rd = null; } + } + return null; + } + + /** Get a resource from a classloader as stream. + * @param classLoader ClassLoader to get resource from + * @param serviceId service file to get stream from + * @return stream for resource <var>serviceId</var> in <var>classLoader</var> + */ + private static InputStream getResourceAsStream(final ClassLoader classLoader, final String serviceId) { + return AccessController.doPrivileged(new PrivilegedAction<InputStream>() { + + /** {@inheritDoc} */ + public InputStream run() { + return classLoader == null ? + ClassLoader.getSystemResourceAsStream(serviceId) : + classLoader.getResourceAsStream(serviceId); + } + + }); + } + + /** Get the ClassLoader. + * @return ClassLoader + */ + private static ClassLoader getClassLoader() { + try { + final ClassLoader contextClassLoader = getContextClassLoader(); + if (contextClassLoader != null) { + return contextClassLoader; + } + } catch (final Exception e) { + /* ignore */ + } + return TipOfTheDayManager.class.getClassLoader(); + } + + /** Get the context ClassLoader. + * @return context ClassLoader + */ + private static ClassLoader getContextClassLoader() { + return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() { + + /** {@inheritDoc} */ + @Nullable public ClassLoader run() { + try { + return Thread.currentThread().getContextClassLoader(); + } catch (final SecurityException ex) { + return null; + } + } + + }); + } + + /** Constructor. */ + private TipOfTheDayManager() { + final String[] keys = { "todPrev", "todRand", "todNext", "todClose" }; + final Action[] actions = new Action[keys.length]; + final Object[] newOptions = new Object[keys.length]; + for (int i = 0; i < keys.length; i++) { + actions[i] = ACTION_FACTORY.createAction(false, keys[i], this); + newOptions[i] = new JButton(actions[i]); + if ("todClose".equals(keys[i])) { + closeButton = (JButton) newOptions[i]; + } + for (final String key : ACCELERATOR_KEYS) { + final KeyStroke ks = (KeyStroke) actions[i].getValue(key); + if (ks != null) { + getInputMap(WHEN_IN_FOCUSED_WINDOW).put(ks, keys[i]); + getActionMap().put(keys[i], actions[i]); + } + } + } + final Dimension size = new Dimension(512, 128); + showAtStartup.setSelected(PREFS.getBoolean("showTipOfTheDayAtStartup", true)); + final JScrollPane todTextScroller = new JScrollPane(todText); + todTextScroller.setMinimumSize(size); + todTextScroller.setPreferredSize(size); + todTextScroller.setFocusable(true); + todTextScroller.setAutoscrolls(true); + todText.setEditable(false); + todText.setRequestFocusEnabled(false); + currentTodIndex.setHorizontalAlignment(TRAILING); + loadTodTexts(); + setTodIndex(PREFS.getInt("lastTipOfTheDayNumber", -1) + 1); + setIcon(getDefaultIconManager().getIcon(ACTION_FACTORY.getString("tipOfTheDay.icon"))); + final JLabel heading = new JLabel(ACTION_FACTORY.getString("todHeading")); + final Font oldFont = heading.getFont(); + heading.setFont(oldFont.deriveFont((float) (oldFont.getSize2D() * 1.5))); + setMessage(new Object[] { heading, todTextScroller, currentTodIndex, showAtStartup }); + setMessageType(INFORMATION_MESSAGE); + setOptions(newOptions); + } + + /** Loads the Tip of the day texts. */ + private void loadTodTexts() { + final ResourceBundle todBundle = getBundle(getBundleName()); + for (int i = 1;; i++) { + try { + todTexts.add(todBundle.getString(new StringBuilder().append("tod.text.").append(i).toString())); + } catch (final MissingResourceException e) { + break; + } + } + } + + /** Sets the tod index. + * @param todIndex new todIndex + */ + private void setTodIndex(final int todIndex) { + try { + this.todIndex = (todIndex + todTexts.size()) % todTexts.size(); + todText.setText(todTexts.get(this.todIndex)); + currentTodIndex.setText(ACTION_FACTORY.format("todIndex", this.todIndex + 1, todTexts.size())); + } catch (final ArithmeticException e) { + todText.setText(ACTION_FACTORY.getString("todsUnavailable")); + currentTodIndex.setText(""); + } + } + + /** Returns number of current Tip of the day. + * In visible state, the index must range between 0 and the number of tods available - 1, inclusive. + * @return number of current Tip of the day. + */ + public int getTodIndex() { + return todIndex; + } + + /** Action method for close. */ + public void todClose() { + setValue(closeButton); + PREFS.putBoolean("showTipOfTheDayAtStartup", showAtStartup.isSelected()); + PREFS.putInt("lastTipOfTheDayNumber", todIndex); + dialog.setVisible(false); + dialog.dispose(); + dialog = null; + } + + /** Action method for next. */ + public void todNext() { + setTodIndex(todIndex + 1); + } + + /** Action method for previous. */ + public void todPrev() { + setTodIndex(todIndex - 1); + } + + /** Action method for random. */ + public void todRand() { + setTodIndex(RND.nextInt(todTexts.size())); + } + +} // class TipOfTheDayManager Property changes on: libs/swing-tod/trunk/src/net/sf/japi/swing/tod/TipOfTheDayManager.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Copied: libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action.properties (from rev 315, libs/swing-tod/trunk/src/net/sf/japi/swing/action.properties) =================================================================== --- libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action.properties (rev 0) +++ libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action.properties 2007-01-20 14:44:32 UTC (rev 316) @@ -0,0 +1,56 @@ +# JAPI - (Yet another (hopefully) useful) Java API +# +# Copyright (C) 2004-2006 Christian Hujer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# + + +todPrev.text=Previous +todPrev.mnemonic=P +todPrev.accel=P +todPrev.accel2=LEFT +todPrev.icon=navigation/Back16 +todPrev.shortdescription=Displays the previous Tip Of The Day. +todNext.text=Next +todNext.mnemonic=N +todNext.accel=N +todNext.accel2=RIGHT +todNext.icon=navigation/Forward16 +todNext.shortdescription=Displays the next Tip Of The Day. +todRand.text=Random +todRand.mnemonic=R +todRand.accel=R +todRand.shortdescription=Displays a random Tip Of The Day. +todClose.mnemonic=C +todClose.accel=C +todClose.text=Close +todClose.shortdescription=Closes the Tip Of The Day window. +tipOfTheDay.icon=general/TipOfTheDay24 +todShowAtStartup.text=Show Tip Of The Day at startup +todShowAtStartup.mnemonic=S +todShowAtStartup.shortdescription=<html>If checked, a Tip Of The Day will be shown at application startup.<br>If unchecked, a Tip Of The Day will only be shown on demand. +tipOfTheDay.windowTitle=Tip Of The Day +todsUnavailable=No Tips Of The Day available +todHeading=Did you know? +todIndex=Showing Tip Of The Day {0} of {1}. +optionsChooseFile.icon=general/Open16 +saxErrorClear.text=Clear +saxErrorClose.text=Close +saxError.title=XML Errors +dialogDontShowAgain=Show this dialog again next time. +laf=Look and Feel +ReflectionAction.nonPublicMethod=Action Methods must be accessible public. That means the declaring class as well as the method must be public.\n{0} \ No newline at end of file Property changes on: libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Copied: libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action_de.properties (from rev 315, libs/swing-tod/trunk/src/net/sf/japi/swing/action_de.properties) =================================================================== --- libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action_de.properties (rev 0) +++ libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action_de.properties 2007-01-20 14:44:32 UTC (rev 316) @@ -0,0 +1,48 @@ +# JAPI - (Yet another (hopefully) useful) Java API +# +# Copyright (C) 2004-2006 Christian Hujer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# + + +todPrev.text=Vorheriger +todPrev.mnemonic=V +todPrev.accel=V +todPrev.shortdescription=Zeigt den vorherigen Tipp des Tages. +todNext.text=N\xE4chster +todNext.mnemonic=N +todNext.accel=N +todNext.shortdescription=Zeigt den n\xE4chsten Tipp des Tages. +todRand.text=Zuf\xE4llig +todRand.mnemonic=R +todRand.accel=R +todRand.shortdescription=Zeigt einen zuf\xE4lligen Tipp des Tages. +todClose.mnemonic=S +todClose.accel=S +todClose.text=Schlie\xDFen +todClose.shortdescription=Schlie\xDFt das Tipp des Tages Fenster. +todShowAtStartup.text=Tipp des Tages beim Start anzeigen +todShowAtStartup.mnemonic=S +todShowAtStartup.shortdescription=<html>Wenn aktiviert, wird ein Tipp des Tages automatisch bei Programmstart angezeigt.<br>Wenn nicht aktiviert, werden Tipps des Tages nur auf ausdr\xFCcklichen Wunsch angezeigt. +tipOfTheDay.windowTitle=Tipp des Tages +todsUnavailable=Keine Tipps des Tages verf\xFCgbar +todHeading=Wussten Sie schon? +todIndex=Zeige Tipp des Tages {0} aus {1}. +dialogDontShowAgain=Show this dialog again next time. +saxError.title=XML Fehler +saxErrorClear.text=L\xF6schen +saxErrorClose.text=Schlie\xDFen Property changes on: libs/swing-tod/trunk/src/net/sf/japi/swing/tod/action_de.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-19 23:55:59
|
Revision: 315 http://svn.sourceforge.net/japi/?rev=315&view=rev Author: christianhujer Date: 2007-01-19 15:55:54 -0800 (Fri, 19 Jan 2007) Log Message: ----------- Do not throw NPE when logo URL isn't found. Instead print a warning. Modified Paths: -------------- libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java Modified: libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java =================================================================== --- libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java 2007-01-18 21:08:07 UTC (rev 314) +++ libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java 2007-01-19 23:55:54 UTC (rev 315) @@ -31,6 +31,7 @@ import java.util.ResourceBundle; import java.util.SortedSet; import java.util.TreeSet; +import java.net.URL; import javax.swing.ImageIcon; import javax.swing.JComponent; import javax.swing.JLabel; @@ -123,9 +124,14 @@ actionFactory = ActionFactory.getFactory(actionFactoryName); tabs = new JTabbedPane(); licensePane = buildLicenseTab(); - @Nullable final String logoURL = actionFactory.getString("about.logo"); - if (logoURL != null) { - add(new JLabel(new ImageIcon(getClass().getClassLoader().getResource(logoURL))), BorderLayout.NORTH); + @Nullable final String logoURLString = actionFactory.getString("about.logo"); + if (logoURLString != null) { + @Nullable final URL logoURL = getClass().getClassLoader().getResource(logoURLString); + if (logoURL != null) { + add(new JLabel(new ImageIcon(logoURL)), BorderLayout.NORTH); + } else { + System.err.println("Warning: Logo for about dialog (\"" + logoURLString + "\") not found."); + } } add(tabs); addTab(buildAboutTab()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-18 21:08:09
|
Revision: 314 http://svn.sourceforge.net/japi/?rev=314&view=rev Author: christianhujer Date: 2007-01-18 13:08:07 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Fixed wrong mime-type property. Property Changed: ---------------- libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java libs/argparser/trunk/src/net/sf/japi/io/args/package-info.java Property changes on: libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java ___________________________________________________________________ Name: svn:mime-type - text/html + text/plain Property changes on: libs/argparser/trunk/src/net/sf/japi/io/args/package-info.java ___________________________________________________________________ Name: svn:mime-type - text/xml + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-18 20:36:51
|
Revision: 313 http://svn.sourceforge.net/japi/?rev=313&view=rev Author: christianhujer Date: 2007-01-18 12:36:41 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Changed package.html to package-info.java Added Paths: ----------- libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java libs/argparser/trunk/src/net/sf/japi/io/args/package-info.java Removed Paths: ------------- libs/argparser/trunk/src/net/sf/japi/io/args/converter/package.html libs/argparser/trunk/src/net/sf/japi/io/args/package.html Copied: libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java (from rev 306, libs/argparser/trunk/src/net/sf/japi/io/args/converter/package.html) =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java (rev 0) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java 2007-01-18 20:36:41 UTC (rev 313) @@ -0,0 +1,25 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * The Converter package contains classes for automatic argument conversion. + * For instance, a Command might simply want to read bytes from an InputStream. + * The Converter package makes will convert the String into an InputStream then. + */ +package net.sf.japi.io.args.conveter; Property changes on: libs/argparser/trunk/src/net/sf/japi/io/args/converter/package-info.java ___________________________________________________________________ Name: svn:mime-type + text/html Name: svn:eol-style + LF Deleted: libs/argparser/trunk/src/net/sf/japi/io/args/converter/package.html =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/package.html 2007-01-18 18:44:02 UTC (rev 312) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/package.html 2007-01-18 20:36:41 UTC (rev 313) @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- JAPI - (Yet another (hopefully) useful) Java API - - - - Copyright (C) 2004-2006 Christian Hujer - - - - This program is free software; you can redistribute it and/or - - modify it under the terms of the GNU General Public License as - - published by the Free Software Foundation; either version 2 of the - - License, or (at your option) any later version. - - - - This program is distributed in the hope that it will be useful, but - - WITHOUT ANY WARRANTY; without even the implied warranty of - - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - - General Public License for more details. - - - - You should have received a copy of the GNU General Public License - - along with this program; if not, write to the Free Software - - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - - 02111-1307, USA. - --> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> - <head> - <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> - <meta name="Date" content="$Date: 2006-04-03 23:00:14 +0200 (Mon, 03 Apr 2006) $" /> - <title>net.sf.japi.io.args.converter</title> - </head> - <body> - <p> - The Converter package contains classes for automatic argument conversion. - For instance, a Command might simply want to read bytes from an InputStream. - The Converter package makes will convert the String into an InputStream then. - </p> - </body> -</html> Copied: libs/argparser/trunk/src/net/sf/japi/io/args/package-info.java (from rev 306, libs/argparser/trunk/src/net/sf/japi/io/args/package.html) =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/package-info.java (rev 0) +++ libs/argparser/trunk/src/net/sf/japi/io/args/package-info.java 2007-01-18 20:36:41 UTC (rev 313) @@ -0,0 +1,46 @@ +/* + * JAPI libs-argparser is a library for parsing command line arguments. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * ArgParser is a library for parsing command line arguments. + * <p/> + * It supports short options (e.g. <samp>-h</samp>) and long options (e.g. <samp>--help</samp>). + * <p/> + * If an option takes a parameter, the argument value may follow the option as separate argument. + * If the option is a long option, the value may alternatively be included in the argument string using the <code>'='</code>-character. + * For instance, if an option has short name <samp>i</samp> and long name <samp>in</samp> and the option takes a String argument, the following variants are possible: + * <samp>-i foo</samp>, <samp>--in foo</samp> and <samp>--in=foo</samp>. + * <p/> + * Short options may be given in the same String. + * For instance, if there are the short options <samp>v</samp>, <samp>i</samp> and <samp>s</samp>, all of them may be given together in a single String. + * That means the following variants are possible: + * <samp>-vis</samp>, <samp>-v -i -s</samp> and any combination of separated and concatenated versions like <samp>-v -is</samp>. + * If short options take argument values and they are concatenated, the argument values are separate strings following the concatenated option in exactly the order of the concatenated options. + * In <samp>-io foo bar</samp>, given that both, <samp>i</samp> and <samp>o</samp> take an argument value, <samp>foo</samp> is value for <samp>i</samp>, while <samp>bar</samp> is value for <samp>o</samp>. + * <p/> + * The special option <code>--</code> will stop argument parsing. + * All strings that follow the <code>--</code>-option are treated as command arguments, not options, even if they start with <code>-</code>. + * <p/> + * The ArgParser library is built upon the JavaBeans concept. + * A command is a JavaBean, the command's options are bean properties. + * Currently, the corresponding setter method needs to be marked as {@link Option}. + * In future it will be the underlying field. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +package net.sf.japi.io.args; Property changes on: libs/argparser/trunk/src/net/sf/japi/io/args/package-info.java ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + LF Deleted: libs/argparser/trunk/src/net/sf/japi/io/args/package.html =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/package.html 2007-01-18 18:44:02 UTC (rev 312) +++ libs/argparser/trunk/src/net/sf/japi/io/args/package.html 2007-01-18 20:36:41 UTC (rev 313) @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- JAPI - (Yet another (hopefully) useful) Java API - - - - Copyright (C) 2004-2006 Christian Hujer - - - - This program is free software; you can redistribute it and/or - - modify it under the terms of the GNU General Public License as - - published by the Free Software Foundation; either version 2 of the - - License, or (at your option) any later version. - - - - This program is distributed in the hope that it will be useful, but - - WITHOUT ANY WARRANTY; without even the implied warranty of - - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - - General Public License for more details. - - - - You should have received a copy of the GNU General Public License - - along with this program; if not, write to the Free Software - - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - - 02111-1307, USA. - --> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> - <head> - <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> - <meta name="Date" content="$Date: 2006-04-03 23:00:14 +0200 (Mon, 03 Apr 2006) $" /> - <title>net.sf.japi.io.args</title> - </head> - <body> - <p> - ArgParser is a library for parsing command line arguments. - </p> - <p> - It supports short options (e.g. <samp>-h</samp>) and long options (e.g. <samp>--help</samp>). - </p> - <p> - If an option takes a parameter, the argument value may follow the option as separate argument. - If the option is a long option, the value may alternatively be included in the argument string using the <code>'='</code>-character. - For instance, if an option has short name <samp>i</samp> and long name <samp>in</samp> and the option takes a String argument, the following variants are possible: - <samp>-i foo</samp>, <samp>--in foo</samp> and <samp>--in=foo</samp>. - </p> - <p> - Short options may be given in the same String. - For instance, if there are the short options <samp>v</samp>, <samp>i</samp> and <samp>s</samp>, all of them may be given together in a single String. - That means the following variants are possible: - <samp>-vis</samp>, <samp>-v -i -s</samp> and any combination of separated and concatenated versions like <samp>-v -is</samp>. - If short options take argument values and they are concatenated, the argument values are separate strings following the concatenated option in exactly the order of the concatenated options. - In <samp>-io foo bar</samp>, given that both, <samp>i</samp> and <samp>o</samp> take an argument value, <samp>foo</samp> is value for <samp>i</samp>, while <samp>bar</samp> is value for <samp>o</samp>. - </p> - <p> - The special option <code>--</code> will stop argument parsing. - All strings that follow the <code>--</code>-option are treated as command arguments, not options, even if they start with <code>-</code>. - </p> - <p> - The ArgParser library is built upon the JavaBeans concept. - A command is a JavaBean, the command's options are bean properties. - Currently, the corresponding setter method needs to be marked as {@link Option}. - In future it will be the underlying field. - </p> - </body> -</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-18 18:44:07
|
Revision: 312 http://svn.sourceforge.net/japi/?rev=312&view=rev Author: christianhujer Date: 2007-01-18 10:44:02 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Adding list model for collections. Added Paths: ----------- libs/swing-misc/trunk/src/net/sf/japi/swing/misc/CollectionsListModel.java Added: libs/swing-misc/trunk/src/net/sf/japi/swing/misc/CollectionsListModel.java =================================================================== --- libs/swing-misc/trunk/src/net/sf/japi/swing/misc/CollectionsListModel.java (rev 0) +++ libs/swing-misc/trunk/src/net/sf/japi/swing/misc/CollectionsListModel.java 2007-01-18 18:44:02 UTC (rev 312) @@ -0,0 +1,200 @@ +package net.sf.japi.swing.misc; + +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.ListIterator; +import javax.swing.AbstractListModel; + +/** + * A ListModel for {@link java.util.List}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class CollectionsListModel<E> extends AbstractListModel implements List<E> { + + /** The list to delegate to. */ + private final List<E> list; + + /** + * Creates a new CollectionsListModel. + * @param list List to delegate to + */ + public CollectionsListModel(final List<E> list) { + this.list = list; + } + + /** {@inheritDoc} */ + public int size() { + return list.size(); + } + + /** {@inheritDoc} */ + public boolean isEmpty() { + return list.isEmpty(); + } + + /** {@inheritDoc} */ + public boolean contains(final Object o) { + return list.contains(o); + } + + /** {@inheritDoc} */ + public Iterator<E> iterator() { + return list.iterator(); + } + + /** {@inheritDoc} */ + public Object[] toArray() { + return list.toArray(); + } + + /** {@inheritDoc} */ + public <T> T[] toArray(final T[] ts) { + return list.toArray(ts); + } + + /** {@inheritDoc} */ + public boolean add(final E e) { + final boolean changed = list.add(e); + final int size = size(); + if (changed) { + fireIntervalRemoved(this, size, size); + } + return changed; + } + + /** {@inheritDoc} */ + public boolean remove(final Object o) { + final int size = size(); + final boolean changed = list.remove(o); + if (changed) { + fireIntervalRemoved(this, size, size); + } + return changed; + } + + /** {@inheritDoc} */ + public boolean containsAll(final Collection<?> objects) { + return list.containsAll(objects); + } + + /** {@inheritDoc} */ + public boolean addAll(final Collection<? extends E> es) { + final int size = size(); + final boolean changed = list.addAll(es); + if (changed) { + fireIntervalAdded(this, size, size()); + } + return changed; + } + + /** {@inheritDoc} */ + public boolean addAll(final int i, final Collection<? extends E> es) { + final int size = size(); + final boolean changed = list.addAll(i, es); + if (changed) { + fireIntervalAdded(this, i, i + size() - size); + } + return changed; + } + + /** {@inheritDoc} */ + public boolean removeAll(final Collection<?> objects) { + final int size = size(); + final boolean changed = list.removeAll(objects); + if (changed) { + fireIntervalRemoved(this, 0, size); + fireIntervalAdded(this, 0, size()); + } + return changed; + } + + /** {@inheritDoc} */ + public boolean retainAll(final Collection<?> objects) { + final int size = size(); + final boolean changed = list.retainAll(objects); + if (changed) { + fireIntervalRemoved(this, 0, size); + fireIntervalAdded(this, 0, size()); + } + return changed; + } + + /** {@inheritDoc} */ + public void clear() { + final int size = size(); + list.clear(); + fireIntervalRemoved(this, 0, size); + } + + /** {@inheritDoc} */ + public boolean equals(final Object o) { + return list.equals(o); + } + + /** {@inheritDoc} */ + public int hashCode() { + return list.hashCode(); + } + + /** {@inheritDoc} */ + public E get(final int i) { + return list.get(i); + } + + /** {@inheritDoc} */ + public E set(final int i, final E e) { + final E oldElement = list.set(i, e); + fireContentsChanged(this, i, i); + return oldElement; + } + + /** {@inheritDoc} */ + public void add(final int i, final E e) { + list.add(i, e); + fireIntervalAdded(this, i, i); + } + + /** {@inheritDoc} */ + public E remove(final int i) { + final E removedElement = list.remove(i); + fireIntervalRemoved(this, i, i); + return removedElement; + } + + /** {@inheritDoc} */ + public int indexOf(final Object o) { + return list.indexOf(o); + } + + /** {@inheritDoc} */ + public int lastIndexOf(final Object o) { + return list.lastIndexOf(o); + } + + /** {@inheritDoc} */ + public ListIterator<E> listIterator() { + return list.listIterator(); + } + + /** {@inheritDoc} */ + public ListIterator<E> listIterator(final int i) { + return list.listIterator(i); + } + + /** {@inheritDoc} */ + public List<E> subList(final int i, final int i1) { + return list.subList(i, i1); + } + + /** {@inheritDoc} */ + public int getSize() { + return size(); + } + + /** {@inheritDoc} */ + public E getElementAt(final int i) { + return get(i); + } + +} // class CollectionsListModel Property changes on: libs/swing-misc/trunk/src/net/sf/japi/swing/misc/CollectionsListModel.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-18 18:32:50
|
Revision: 311 http://svn.sourceforge.net/japi/?rev=311&view=rev Author: christianhujer Date: 2007-01-18 10:32:49 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Added main for testing. Modified Paths: -------------- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecSelectionPanel.java Modified: tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecSelectionPanel.java =================================================================== --- tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecSelectionPanel.java 2007-01-18 18:31:46 UTC (rev 310) +++ tools/string2bytes/trunk/src/net/sf/japi/string2bytes/CodecSelectionPanel.java 2007-01-18 18:32:49 UTC (rev 311) @@ -50,4 +50,11 @@ add(new JScrollPane(configuredCodecSteps), gbc); } + /** + * Main method, used to try the CodecSelectionPanel. + * @param args Command line arguments (ignored) + */ + public static void main(final String... args) { + } + } // class CodecSelectionPanel This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-18 18:31:50
|
Revision: 310 http://svn.sourceforge.net/japi/?rev=310&view=rev Author: christianhujer Date: 2007-01-18 10:31:46 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Adding frame for jeduca. Added Paths: ----------- progs/ progs/jeduca/ progs/jeduca/branches/ progs/jeduca/tags/ progs/jeduca/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-01-18 17:36:46
|
Revision: 309 http://svn.sourceforge.net/japi/?rev=309&view=rev Author: christianhujer Date: 2007-01-18 09:36:39 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Added charset validity checks to Recode example. Modified Paths: -------------- libs/argparser/trunk/src/doc/examples/Recode.java Modified: libs/argparser/trunk/src/doc/examples/Recode.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Recode.java 2007-01-18 17:03:18 UTC (rev 308) +++ libs/argparser/trunk/src/doc/examples/Recode.java 2007-01-18 17:36:39 UTC (rev 309) @@ -12,6 +12,7 @@ import java.io.Writer; import java.util.List; import java.nio.channels.FileChannel; +import java.nio.charset.Charset; import net.sf.japi.io.args.ArgParser; import net.sf.japi.io.args.BasicCommand; import net.sf.japi.io.args.Option; @@ -38,6 +39,7 @@ @Option(value = {"i", "inputEncoding"}, type = REQUIRED) public void setInputEncoding(final String inputEncoding) { this.inputEncoding = inputEncoding; + Charset.forName(inputEncoding); // check whether the charset's name is okay } /** @@ -47,6 +49,7 @@ @Option(value = {"o", "outputEncoding"}, type = REQUIRED) public void setOutputEncoding(final String outputEncoding) { this.outputEncoding = outputEncoding; + Charset.forName(outputEncoding); // check whether the charset's name is okay } /** {@inheritDoc} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |