You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <chr...@us...> - 2006-05-26 19:14:11
|
Revision: 33 Author: christianhujer Date: 2006-05-26 12:13:59 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=33&view=rev Log Message: ----------- Removed unused bigsize parameter from help window. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java trunk/crossfire/src/cfeditor/help/CFHelp.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 18:49:11 UTC (rev 32) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 19:13:59 UTC (rev 33) @@ -49,7 +49,6 @@ import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JDialog; -import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; @@ -1049,7 +1048,7 @@ help_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // create html-docu on the current type and display it - new CFHelp(m_control.getMainView(), type.createHtmlDocu(), CMainControl.getInstance().isBigFont()).setVisible(true); + new CFHelp(m_control.getMainView(), type.createHtmlDocu()).setVisible(true); } }); Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-05-26 18:49:11 UTC (rev 32) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-05-26 19:13:59 UTC (rev 33) @@ -674,7 +674,7 @@ helpButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { // open the help window - new CFHelp(CMainControl.getInstance().getMainView(), "treasurelists.html", false).setVisible(true); + new CFHelp(CMainControl.getInstance().getMainView(), "treasurelists.html").setVisible(true); } }); leftSide.add(helpButton); Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-05-26 18:49:11 UTC (rev 32) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-05-26 19:13:59 UTC (rev 33) @@ -275,7 +275,7 @@ /** open the online help window */ public void openHelpWindow() { - new CFHelp(this, null, false).setVisible(true); + new CFHelp(this, null).setVisible(true); } public void setPickmapActive(boolean state) { Modified: trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java 2006-05-26 18:49:11 UTC (rev 32) +++ trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java 2006-05-26 19:13:59 UTC (rev 33) @@ -38,7 +38,6 @@ import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; @@ -354,7 +353,7 @@ button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { // open the help window - new CFHelp(m_control.getMainView(), "tut_mapattr.html", false).setVisible(true); + new CFHelp(m_control.getMainView(), "tut_mapattr.html").setVisible(true); } }); left_buttons.add(button); Modified: trunk/crossfire/src/cfeditor/help/CFHelp.java =================================================================== --- trunk/crossfire/src/cfeditor/help/CFHelp.java 2006-05-26 18:49:11 UTC (rev 32) +++ trunk/crossfire/src/cfeditor/help/CFHelp.java 2006-05-26 19:13:59 UTC (rev 33) @@ -57,7 +57,7 @@ * @todo refactor this. The dual semantic of fname is a Bad Thing. * @todo always creating new help windows is a Bad Thing as well, make this constructor private */ - public CFHelp(final JFrame parent, String fname, final boolean bigSize) { + public CFHelp(final JFrame parent, String fname) { super(parent, "Help", false); // super constructor setResizable(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-26 18:49:40
|
Revision: 32 Author: christianhujer Date: 2006-05-26 11:49:11 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=32&view=rev Log Message: ----------- Unified DHelp / CFHelp. Modified Paths: -------------- trunk/crossfire/build.xml trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java trunk/crossfire/src/cfeditor/help/CFHelp.java trunk/daimonin/DaimoninEditor.jar trunk/daimonin/build.xml trunk/daimonin/src/daieditor/help/DHelp.java Added Paths: ----------- trunk/lib/LICENSE-japi.jar trunk/lib/japi.jar Removed Paths: ------------- trunk/daimonin/lib/LICENSE-japi.jar trunk/daimonin/lib/japi.jar Modified: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/crossfire/build.xml 2006-05-26 18:49:11 UTC (rev 32) @@ -39,13 +39,14 @@ <target name="compile" depends="init,clean"> <javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" encoding="utf-8"> <classpath> - <fileset dir="${lib.dir}" includes="*.jar" /> + <fileset dir="${lib.dir}" includes="*.jar" excludes="LICENSE-*.jar" /> + <fileset dir="../lib/" includes="*.jar" excludes="LICENSE-*.jar" /> </classpath> </javac> </target> <!-- create JAR file --> - <target name="jar" depends="compile"> + <target name="jar" depends="compile" description="compiles source and creates jar."> <!-- extract classes from jar files into the build dir --> <unjar src="${lib.dir}/png.jar" dest="${build.dir}" /> <unjar src="${lib.dir}/visualtek.jar" dest="${build.dir}" /> @@ -70,11 +71,16 @@ <delete dir="${build.dir}/pickmaps" /> <delete dir="${build.dir}/conf" /> - <jar destfile="${jarname}"> + <jar + destfile = "${jarname}" + index = "true" + > <!-- pack everything into the jar file --> - <fileset dir="${build.dir}" - excludes="**/Entries,**/Repository,**/Root,MANIFEST.MF"/> - + <fileset dir="${build.dir}" excludes="MANIFEST.MF,test/**"/> + + <zipfileset src="../lib/japi.jar"> + <include name="net/sf/japi/swing/DisposeAction.class" /> + </zipfileset> <!-- creating the manifest --> <manifest> <attribute name="Main-Class" value="cfeditor.CFJavaEditor"/> Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 18:49:11 UTC (rev 32) @@ -1049,9 +1049,7 @@ help_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // create html-docu on the current type and display it - JFrame ahelp = new CFHelp(m_control.getMainView(), - type.createHtmlDocu(), CMainControl.getInstance().isBigFont()); - ahelp.setVisible(true); // show the window + new CFHelp(m_control.getMainView(), type.createHtmlDocu(), CMainControl.getInstance().isBigFont()).setVisible(true); } }); Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-05-26 18:49:11 UTC (rev 32) @@ -674,8 +674,7 @@ helpButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { // open the help window - JFrame help = new CFHelp(CMainControl.getInstance().getMainView(), "treasurelists.html", false); - help.setVisible(true); // show the window + new CFHelp(CMainControl.getInstance().getMainView(), "treasurelists.html", false).setVisible(true); } }); leftSide.add(helpButton); Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-05-26 18:49:11 UTC (rev 32) @@ -275,8 +275,7 @@ /** open the online help window */ public void openHelpWindow() { - JFrame help = new CFHelp(this, null, false); // initialize the frame - help.setVisible(true); // show the window + new CFHelp(this, null, false).setVisible(true); } public void setPickmapActive(boolean state) { Modified: trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java 2006-05-26 18:49:11 UTC (rev 32) @@ -354,8 +354,7 @@ button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { // open the help window - JFrame help = new CFHelp(m_control.getMainView(), "tut_mapattr.html", false); - help.setVisible(true); // show the window + new CFHelp(m_control.getMainView(), "tut_mapattr.html", false).setVisible(true); } }); left_buttons.add(button); Modified: trunk/crossfire/src/cfeditor/help/CFHelp.java =================================================================== --- trunk/crossfire/src/cfeditor/help/CFHelp.java 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/crossfire/src/cfeditor/help/CFHelp.java 2006-05-26 18:49:11 UTC (rev 32) @@ -1,56 +1,84 @@ +/* + * Daimonin Java Editor. + * Copyright (C) 2000 Michael Toennies + * Copyright (C) 2001 Andreas Vogl + * + * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) + * + * 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 cfeditor.help; -import cfeditor.CGUIUtils; -import cfeditor.IGUIConstants; import java.awt.Rectangle; +import javax.swing.JDialog; import javax.swing.JFrame; +import net.sf.japi.swing.DisposeAction; /** * <code>CFHelp</code> implements the Help Window is a seperate frame with html content. * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> + * @author <a href="mailto:ch...@it...">Christian Hujer</a> + * @todo make 1 single class out of these two + * @todo add back and home buttons so they needn't be in the documentation + * @todo add method to set the currently displayed help page from the outside + * @todo add bookmarks to help + * @todo add index to help * @deprecated We'll use JavaHelp instead. */ -@Deprecated public class CFHelp extends JFrame { +@Deprecated public final class CFHelp extends JDialog { - private static final long serialVersionUID = 6896632173566618870L; + /** Serial Version UID. */ + private static final long serialVersionUID = 1L; /** - * Konstructor - * @param mainView the main view - * @param bigSize if true, the frame gets bigger than normal - * (useful in combination with larger fonts) - * @param fname may contain different things: - * 1. null -> the file "start.html" is opened - * 2. File name of a html-file to be opened - * 3. html-text to be displayed directly (no file) - * (this text must start with "<HTML>") + * Constructor + * @param parent the main view to get bounds from to position the help + * @param fname may contain different things: + * 1. null -> the file "start.html" is opened + * 2. File name of a html-file to be opened + * 3. html-text to be displayed directly (no file) + * (this text must start with "<HTML>") + * @todo refactor this. The dual semantic of fname is a Bad Thing. + * @todo always creating new help windows is a Bad Thing as well, make this constructor private */ - public CFHelp(final JFrame mainView, String fname, final boolean bigSize) { - super("Help"); // super constructor + public CFHelp(final JFrame parent, String fname, final boolean bigSize) { + super(parent, "Help", false); // super constructor + setResizable(true); - // set application icon - setIconImage(CGUIUtils.getIcon(IGUIConstants.APP_ICON).getImage()); + final Rectangle mvb = parent.getBounds(); // get main view bounds + setBounds(mvb.x + (mvb.width >> 1) - 260, mvb.y + 70, 520, 600); // standard - final Rectangle mvb = mainView.getBounds(); // get main view bounds - if (bigSize) { - setBounds(mvb.x + (mvb.width >> 1) - 300, mvb.y + 70, 600, 750); // big size - } else { - setBounds(mvb.x + (mvb.width >> 1) - 260, mvb.y + 70, 520, 600); // standard - } - - if (fname == null) { + if (fname == null) { // FIXME: Do not hardcode "start.html" fname = "start.html"; } - final HtmlPane html; - if (fname.startsWith("<HTML>")) { + if (fname.startsWith("<HTML>") || fname.startsWith("<html")) { + if (fname.startsWith("<HTML")) { + System.err.println("Wrong formatted HTML!"); + } html = new HtmlPane("text/html", fname); // direct text } else { html = new HtmlPane(fname); // read html file } - + DisposeAction.install(this); setContentPane(html); + setDefaultCloseOperation(DISPOSE_ON_CLOSE); } } // class CFHelp Modified: trunk/daimonin/DaimoninEditor.jar =================================================================== (Binary files differ) Modified: trunk/daimonin/build.xml =================================================================== --- trunk/daimonin/build.xml 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/daimonin/build.xml 2006-05-26 18:49:11 UTC (rev 32) @@ -79,6 +79,7 @@ > <classpath> <fileset dir="${lib.dir}" includes="*.jar" excludes="LICENSE-*.jar" /> + <fileset dir="../lib/" includes="*.jar" excludes="LICENSE-*.jar" /> </classpath> <compilerarg line="${javac.args}" /> </javac> @@ -122,7 +123,7 @@ <include name="arch/dev/editor/conf/ArchObjectMatchers.dtd" /> <include name="arch/dev/editor/conf/ArchObjectMatchers.xml" /> </fileset> - <zipfileset src="lib/japi.jar"> + <zipfileset src="../lib/japi.jar"> <include name="net/sf/japi/swing/ActionFactory.class" /> <include name="net/sf/japi/swing/action*.properties" /> <include name="net/sf/japi/swing/ColumnLayout.class" /> Deleted: trunk/daimonin/lib/LICENSE-japi.jar =================================================================== --- trunk/daimonin/lib/LICENSE-japi.jar 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/daimonin/lib/LICENSE-japi.jar 2006-05-26 18:49:11 UTC (rev 32) @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - 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 St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. Deleted: trunk/daimonin/lib/japi.jar =================================================================== (Binary files differ) Modified: trunk/daimonin/src/daieditor/help/DHelp.java =================================================================== --- trunk/daimonin/src/daieditor/help/DHelp.java 2006-05-26 17:05:08 UTC (rev 31) +++ trunk/daimonin/src/daieditor/help/DHelp.java 2006-05-26 18:49:11 UTC (rev 32) @@ -39,7 +39,7 @@ * @todo add method to set the currently displayed help page from the outside * @todo add bookmarks to help * @todo add index to help - * @deprecated in favor of JavaHelp + * @deprecated We'll use JavaHelp instead. */ @Deprecated public final class DHelp extends JDialog { Copied: trunk/lib/LICENSE-japi.jar (from rev 30, trunk/daimonin/lib/LICENSE-japi.jar) =================================================================== --- trunk/lib/LICENSE-japi.jar (rev 0) +++ trunk/lib/LICENSE-japi.jar 2006-05-26 18:49:11 UTC (rev 32) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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 St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Copied: trunk/lib/japi.jar (from rev 30, trunk/daimonin/lib/japi.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...> - 2006-05-26 17:05:25
|
Revision: 31 Author: christianhujer Date: 2006-05-26 10:05:08 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=31&view=rev Log Message: ----------- Unified Html Panes. Modified Paths: -------------- trunk/crossfire/src/cfeditor/help/HtmlPane.java trunk/daimonin/src/daieditor/help/HtmlPane.java Modified: trunk/crossfire/src/cfeditor/help/HtmlPane.java =================================================================== --- trunk/crossfire/src/cfeditor/help/HtmlPane.java 2006-05-26 16:55:28 UTC (rev 30) +++ trunk/crossfire/src/cfeditor/help/HtmlPane.java 2006-05-26 17:05:08 UTC (rev 31) @@ -24,6 +24,7 @@ package cfeditor.help; +import cfeditor.IGUIConstants; import java.awt.Container; import java.awt.Cursor; import java.io.File; @@ -39,32 +40,38 @@ import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; import javax.swing.text.Document; -import cfeditor.IGUIConstants; -class HtmlPane extends JScrollPane implements HyperlinkListener { +/** + * Pane for displaying HTML. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +final class HtmlPane extends JScrollPane implements HyperlinkListener { + /** Logger for logging what's going on here. */ private static final Logger log = Logger.getLogger("HtmlPane.class"); - private static final long serialVersionUID = 7957975761362660439L; + /** Serial Version UID. */ + private static final long serialVersionUID = 1L; - private JEditorPane html; + /** The JEditorPane that displays the html page. */ + private final JEditorPane html; /** - * Constructor to load the html-file <fname> and display + * Constructor to load the html-file <fname> and display * it's contents in this HtmlPane. * @param fname Name of the hmtl-file */ HtmlPane(final String fname) { try { // first looking for the html file in extracted form - final File f = new File(IGUIConstants.HELP_DIR + File.separator + fname); - if (f.exists()) { + final File file = new File(IGUIConstants.HELP_DIR, fname); + if (file.exists()) { // file exists in expected directory - final String s = "file:" + f.getAbsolutePath(); + final String s = "file:" + file.getAbsolutePath(); html = new JEditorPane(s); } else { // file missing, so let's look if we can get it from the jar - URL url = ClassLoader.getSystemResource(IGUIConstants.HELP_DIR.replace('\\', '/') + "/" + fname); + URL url = ClassLoader.getSystemResource(IGUIConstants.HELP_DIR.replace('\\', '/') + '/' + fname); if (url != null) { html = new JEditorPane(url); @@ -76,7 +83,7 @@ html = new JEditorPane(url); } else { log.info("Failed to open help file '" + fname + "'!"); - html = new JEditorPane("text/plain", ""); + throw new RuntimeException(); // FIXME } } } @@ -89,23 +96,29 @@ // this will avoid this problem! // but it will make the scrolling slower // so test this! + // FIXME: This problem should be fixed in the latest versions of the JRE. getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); vp.add(html); + setFocusable(true); + requestFocus(); setAutoscrolls(true); - } catch (NullPointerException e) { + } catch (final NullPointerException e) { // failed to open the html file - } catch (MalformedURLException e) { + throw new RuntimeException(e); // FIXME + } catch (final MalformedURLException e) { log.log(Level.WARNING, "Malformed URL: %s", e); - } catch (IOException e) { + throw new RuntimeException(e); // FIXME + } catch (final IOException e) { log.log(Level.WARNING, "IOException: %s", e); + throw new RuntimeException(e); // FIXME } } /** - * Konstructor to load the html-file <fname> and display - * it's contents in this HtmlPane + * Constructor to load the html-file <fname> and display + * it's contents in this HtmlPane. * @param type mime-type of the given text (e.g. "text/html") * @param text text to display (can be html-text for example) */ @@ -153,23 +166,23 @@ * null argument. * @param u the URL to follow */ - protected void linkActivated(final URL u) { - final Cursor c = html.getCursor(); + void linkActivated(final URL u) { + final Cursor cursor = html.getCursor(); final Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); html.setCursor(waitCursor); - SwingUtilities.invokeLater(new PageLoader(u, c)); + SwingUtilities.invokeLater(new PageLoader(u, cursor)); } /** * Synchronuous page loader, loads a page and handles the cursor. */ - private class PageLoader implements Runnable { + private final class PageLoader implements Runnable { /** URL to load. */ private URL url; /** Original cursor that should be restored once the document is loaded. */ - private Cursor cursor; + private final Cursor cursor; /** * Create a PageLoader. @@ -198,6 +211,7 @@ } catch (final IOException ioe) { html.setDocument(doc); getToolkit().beep(); + // TODO not just beep but display an error message as well. } finally { // schedule the cursor to revert after // the paint has happended. Modified: trunk/daimonin/src/daieditor/help/HtmlPane.java =================================================================== --- trunk/daimonin/src/daieditor/help/HtmlPane.java 2006-05-26 16:55:28 UTC (rev 30) +++ trunk/daimonin/src/daieditor/help/HtmlPane.java 2006-05-26 17:05:08 UTC (rev 31) @@ -1,3 +1,27 @@ +/* + * Daimonin Java Editor. + * Copyright (C) 2000 Michael Toennies + * Copyright (C) 2001 Andreas Vogl + * + * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) + * + * 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 daieditor.help; import daieditor.IGUIConstants; @@ -7,6 +31,8 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; +import java.util.logging.Logger; +import java.util.logging.Level; import javax.swing.JEditorPane; import javax.swing.JScrollPane; import javax.swing.JViewport; @@ -16,11 +42,14 @@ import javax.swing.text.Document; /** - * TODO + * Pane for displaying HTML. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ final class HtmlPane extends JScrollPane implements HyperlinkListener { + /** Logger for logging what's going on here. */ + private static final Logger log = Logger.getLogger("HtmlPane.class"); + /** Serial Version UID. */ private static final long serialVersionUID = 1L; @@ -38,8 +67,7 @@ final File file = new File(IGUIConstants.HELP_DIR, fname); if (file.exists()) { // file exists in expected directory - String s = file.getAbsolutePath(); - s = "file:" + s; + final String s = "file:" + file.getAbsolutePath(); html = new JEditorPane(s); } else { // file missing, so let's look if we can get it from the jar @@ -49,12 +77,12 @@ html = new JEditorPane(url); } else { // let's try it again without first directory - System.err.println("trying: HelpFiles/" + fname); + log.info("trying: HelpFiles/" + fname); url = ClassLoader.getSystemResource("HelpFiles/" + fname); if (url != null) { html = new JEditorPane(url); } else { - System.err.println("Failed to open help file '" + fname + "'!"); + log.info("Failed to open help file '" + fname + "'!"); throw new RuntimeException(); // FIXME } } @@ -69,7 +97,7 @@ // but it will make the scrolling slower // so test this! // FIXME: This problem should be fixed in the latest versions of the JRE. - this.getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); + getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); vp.add(html); @@ -80,10 +108,10 @@ // failed to open the html file throw new RuntimeException(e); // FIXME } catch (final MalformedURLException e) { - System.err.println("Malformed URL: " + e); + log.log(Level.WARNING, "Malformed URL: %s", e); throw new RuntimeException(e); // FIXME } catch (final IOException e) { - System.err.println("IOException: " + e); + log.log(Level.WARNING, "IOException: %s", e); throw new RuntimeException(e); // FIXME } } @@ -105,7 +133,8 @@ // this will avoid this problem! // but it will make the scrolling slower // so test this! - this.getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); + // XXX The main issue probably is extending JScrollPane (Cher) + getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); vp.add(html); @@ -145,16 +174,21 @@ } /** - * temporary class that loads synchronously (although - * later than the request so that a cursor change - * can be done). + * Synchronuous page loader, loads a page and handles the cursor. */ private final class PageLoader implements Runnable { + /** URL to load. */ private URL url; + /** Original cursor that should be restored once the document is loaded. */ private final Cursor cursor; + /** + * Create a PageLoader. + * @param url URL to load + * @param cursor Cursor to restore once the document is loaded + */ private PageLoader(final URL url, final Cursor cursor) { this.url = url; this.cursor = cursor; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-26 16:55:37
|
Revision: 30 Author: christianhujer Date: 2006-05-26 09:55:28 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=30&view=rev Log Message: ----------- Moved HtmlPane to its own file. Modified Paths: -------------- trunk/daimonin/src/daieditor/help/DHelp.java Added Paths: ----------- trunk/daimonin/src/daieditor/help/HtmlPane.java Modified: trunk/daimonin/src/daieditor/help/DHelp.java =================================================================== --- trunk/daimonin/src/daieditor/help/DHelp.java 2006-05-26 16:46:56 UTC (rev 29) +++ trunk/daimonin/src/daieditor/help/DHelp.java 2006-05-26 16:55:28 UTC (rev 30) @@ -24,23 +24,9 @@ package daieditor.help; -import daieditor.IGUIConstants; -import java.awt.Container; -import java.awt.Cursor; import java.awt.Rectangle; -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; import javax.swing.JDialog; -import javax.swing.JEditorPane; import javax.swing.JFrame; -import javax.swing.JScrollPane; -import javax.swing.JViewport; -import javax.swing.SwingUtilities; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; -import javax.swing.text.Document; import net.sf.japi.swing.DisposeAction; /** @@ -95,176 +81,4 @@ setDefaultCloseOperation(DISPOSE_ON_CLOSE); } -} // class CFHelp - -final class HtmlPane extends JScrollPane implements HyperlinkListener { - - /** Serial Version UID. */ - private static final long serialVersionUID = 1L; - - /** The JEditorPane that displays the html page. */ - private final JEditorPane html; - - /** - * Constructor to load the html-file <fname> and display - * it's contents in this HtmlPane. - * @param fname Name of the hmtl-file - */ - HtmlPane(final String fname) { - try { - // first looking for the html file in extracted form - final File file = new File(IGUIConstants.HELP_DIR, fname); - if (file.exists()) { - // file exists in expected directory - String s = file.getAbsolutePath(); - s = "file:" + s; - html = new JEditorPane(s); - } else { - // file missing, so let's look if we can get it from the jar - URL url = ClassLoader.getSystemResource(IGUIConstants.HELP_DIR.replace('\\', '/') + '/' + fname); - - if (url != null) { - html = new JEditorPane(url); - } else { - // let's try it again without first directory - System.err.println("trying: HelpFiles/" + fname); - url = ClassLoader.getSystemResource("HelpFiles/" + fname); - if (url != null) { - html = new JEditorPane(url); - } else { - System.err.println("Failed to open help file '" + fname + "'!"); - throw new RuntimeException(); // FIXME - } - } - } - - html.setEditable(false); - html.addHyperlinkListener(this); - final JViewport vp = getViewport(); - - // under windows, the content of the panel get detroyed after scrolling - // this will avoid this problem! - // but it will make the scrolling slower - // so test this! - // FIXME: This problem should be fixed in the latest versions of the JRE. - this.getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); - vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - - vp.add(html); - setFocusable(true); - requestFocus(); - setAutoscrolls(true); - } catch (final NullPointerException e) { - // failed to open the html file - throw new RuntimeException(e); // FIXME - } catch (final MalformedURLException e) { - System.err.println("Malformed URL: " + e); - throw new RuntimeException(e); // FIXME - } catch (final IOException e) { - System.err.println("IOException: " + e); - throw new RuntimeException(e); // FIXME - } - } - - /** - * Constructor to load the html-file <fname> and display - * it's contents in this HtmlPane. - * @param type mime-type of the given text (e.g. "text/html") - * @param text text to display (can be html-text for example) - */ - HtmlPane(final String type, final String text) { - // open new JEditorPane - html = new JEditorPane(type, text); - html.setEditable(false); - html.addHyperlinkListener(this); - final JViewport vp = getViewport(); - - // under windows, the content of the panel get detroyed after scrolling - // this will avoid this problem! - // but it will make the scrolling slower - // so test this! - this.getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); - vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - - vp.add(html); - //vp.setView(html); - //vp.setViewPosition(new Point(0, 0)); - - setAutoscrolls(true); - } - - /** - * Notification of a change relative to a - * hyperlink. - * @param e occurred <code>HyperlinkEvent</code> - */ - public void hyperlinkUpdate(final HyperlinkEvent e) { - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { - linkActivated(e.getURL()); - } - } - - /** - * Follows the reference in an - * link. The given url is the requested reference. - * By default this calls <a href="#setPage">setPage</a>, - * and if an exception is thrown the original previous - * document is restored and a beep sounded. If an - * attempt was made to follow a link, but it represented - * a malformed url, this method will be called with a - * null argument. - * @param u the URL to follow - */ - void linkActivated(final URL u) { - final Cursor cursor = html.getCursor(); - final Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); - html.setCursor(waitCursor); - SwingUtilities.invokeLater(new PageLoader(u, cursor)); - } - - /** - * temporary class that loads synchronously (although - * later than the request so that a cursor change - * can be done). - */ - private final class PageLoader implements Runnable { - - private URL url; - - private final Cursor cursor; - - private PageLoader(final URL url, final Cursor cursor) { - this.url = url; - this.cursor = cursor; - } - - /** {@inheritDoc} */ - public void run() { - if (url == null) { - // restore the original cursor - html.setCursor(cursor); - - // PENDING(prinz) remove this hack when - // automatic validation is activated. - final Container parent = html.getParent(); - parent.repaint(); - } else { - final Document doc = html.getDocument(); - try { - html.setPage(url); - } catch (final IOException ioe) { - html.setDocument(doc); - getToolkit().beep(); - // TODO not just beep but display an error message as well. - } finally { - // schedule the cursor to revert after - // the paint has happended. - url = null; - SwingUtilities.invokeLater(this); - } - } - } - - } // class PageLoader - -} // class HtmlPane +} // class DHelp Added: trunk/daimonin/src/daieditor/help/HtmlPane.java =================================================================== --- trunk/daimonin/src/daieditor/help/HtmlPane.java (rev 0) +++ trunk/daimonin/src/daieditor/help/HtmlPane.java 2006-05-26 16:55:28 UTC (rev 30) @@ -0,0 +1,192 @@ +package daieditor.help; + +import daieditor.IGUIConstants; +import java.awt.Container; +import java.awt.Cursor; +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import javax.swing.JEditorPane; +import javax.swing.JScrollPane; +import javax.swing.JViewport; +import javax.swing.SwingUtilities; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.text.Document; + +/** + * TODO + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +final class HtmlPane extends JScrollPane implements HyperlinkListener { + + /** Serial Version UID. */ + private static final long serialVersionUID = 1L; + + /** The JEditorPane that displays the html page. */ + private final JEditorPane html; + + /** + * Constructor to load the html-file <fname> and display + * it's contents in this HtmlPane. + * @param fname Name of the hmtl-file + */ + HtmlPane(final String fname) { + try { + // first looking for the html file in extracted form + final File file = new File(IGUIConstants.HELP_DIR, fname); + if (file.exists()) { + // file exists in expected directory + String s = file.getAbsolutePath(); + s = "file:" + s; + html = new JEditorPane(s); + } else { + // file missing, so let's look if we can get it from the jar + URL url = ClassLoader.getSystemResource(IGUIConstants.HELP_DIR.replace('\\', '/') + '/' + fname); + + if (url != null) { + html = new JEditorPane(url); + } else { + // let's try it again without first directory + System.err.println("trying: HelpFiles/" + fname); + url = ClassLoader.getSystemResource("HelpFiles/" + fname); + if (url != null) { + html = new JEditorPane(url); + } else { + System.err.println("Failed to open help file '" + fname + "'!"); + throw new RuntimeException(); // FIXME + } + } + } + + html.setEditable(false); + html.addHyperlinkListener(this); + final JViewport vp = getViewport(); + + // under windows, the content of the panel get detroyed after scrolling + // this will avoid this problem! + // but it will make the scrolling slower + // so test this! + // FIXME: This problem should be fixed in the latest versions of the JRE. + this.getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); + vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); + + vp.add(html); + setFocusable(true); + requestFocus(); + setAutoscrolls(true); + } catch (final NullPointerException e) { + // failed to open the html file + throw new RuntimeException(e); // FIXME + } catch (final MalformedURLException e) { + System.err.println("Malformed URL: " + e); + throw new RuntimeException(e); // FIXME + } catch (final IOException e) { + System.err.println("IOException: " + e); + throw new RuntimeException(e); // FIXME + } + } + + /** + * Constructor to load the html-file <fname> and display + * it's contents in this HtmlPane. + * @param type mime-type of the given text (e.g. "text/html") + * @param text text to display (can be html-text for example) + */ + HtmlPane(final String type, final String text) { + // open new JEditorPane + html = new JEditorPane(type, text); + html.setEditable(false); + html.addHyperlinkListener(this); + final JViewport vp = getViewport(); + + // under windows, the content of the panel get detroyed after scrolling + // this will avoid this problem! + // but it will make the scrolling slower + // so test this! + this.getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); + vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); + + vp.add(html); + //vp.setView(html); + //vp.setViewPosition(new Point(0, 0)); + + setAutoscrolls(true); + } + + /** + * Notification of a change relative to a + * hyperlink. + * @param e occurred <code>HyperlinkEvent</code> + */ + public void hyperlinkUpdate(final HyperlinkEvent e) { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + linkActivated(e.getURL()); + } + } + + /** + * Follows the reference in an + * link. The given url is the requested reference. + * By default this calls <a href="#setPage">setPage</a>, + * and if an exception is thrown the original previous + * document is restored and a beep sounded. If an + * attempt was made to follow a link, but it represented + * a malformed url, this method will be called with a + * null argument. + * @param u the URL to follow + */ + void linkActivated(final URL u) { + final Cursor cursor = html.getCursor(); + final Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); + html.setCursor(waitCursor); + SwingUtilities.invokeLater(new PageLoader(u, cursor)); + } + + /** + * temporary class that loads synchronously (although + * later than the request so that a cursor change + * can be done). + */ + private final class PageLoader implements Runnable { + + private URL url; + + private final Cursor cursor; + + private PageLoader(final URL url, final Cursor cursor) { + this.url = url; + this.cursor = cursor; + } + + /** {@inheritDoc} */ + public void run() { + if (url == null) { + // restore the original cursor + html.setCursor(cursor); + + // PENDING(prinz) remove this hack when + // automatic validation is activated. + final Container parent = html.getParent(); + parent.repaint(); + } else { + final Document doc = html.getDocument(); + try { + html.setPage(url); + } catch (final IOException ioe) { + html.setDocument(doc); + getToolkit().beep(); + // TODO not just beep but display an error message as well. + } finally { + // schedule the cursor to revert after + // the paint has happended. + url = null; + SwingUtilities.invokeLater(this); + } + } + } + + } // class PageLoader + +} // class HtmlPane Property changes on: trunk/daimonin/src/daieditor/help/HtmlPane.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...> - 2006-05-26 16:47:14
|
Revision: 29 Author: christianhujer Date: 2006-05-26 09:46:56 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=29&view=rev Log Message: ----------- Moved help related classes to their own package and deprecated CFHelp in favor of JavaHelp. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java Added Paths: ----------- trunk/crossfire/src/cfeditor/help/ trunk/crossfire/src/cfeditor/help/CFHelp.java trunk/crossfire/src/cfeditor/help/HtmlPane.java Removed Paths: ------------- trunk/crossfire/src/cfeditor/CFHelp.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 11:27:28 UTC (rev 28) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 16:46:56 UTC (rev 29) @@ -25,6 +25,7 @@ package cfeditor; import cfeditor.arch.ArchObject; +import cfeditor.help.CFHelp; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; Deleted: trunk/crossfire/src/cfeditor/CFHelp.java =================================================================== --- trunk/crossfire/src/cfeditor/CFHelp.java 2006-05-26 11:27:28 UTC (rev 28) +++ trunk/crossfire/src/cfeditor/CFHelp.java 2006-05-26 16:46:56 UTC (rev 29) @@ -1,257 +0,0 @@ -/* - * Crossfire Java Editor. - * Copyright (C) 2000 Michael Toennies - * Copyright (C) 2001 Andreas Vogl - * - * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) - * - * 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 cfeditor; - -import java.awt.Container; -import java.awt.Cursor; -import java.awt.Rectangle; -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import javax.swing.JEditorPane; -import javax.swing.JFrame; -import javax.swing.JScrollPane; -import javax.swing.JViewport; -import javax.swing.SwingUtilities; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; -import javax.swing.text.Document; -import org.apache.log4j.Logger; - -/** - * <code>CFHelp</code> implements the Help Window is a seperate frame with html content. - * @author <a href="mailto:mic...@no...">Michael Toennies</a> - * @author <a href="mailto:and...@gm...">Andreas Vogl</a> - */ -public class CFHelp extends JFrame { - - private static final Logger log = Logger.getLogger(CFHelp.class); - - private static final long serialVersionUID = 6896632173566618870L; - - /** - * Konstructor - * @param main_view the main view - * @param big_size if true, the frame gets bigger than normal - * (useful in combination with larger fonts) - * @param fname may contain different things: - * 1. null -> the file "start.html" is opened - * 2. File name of a html-file to be opened - * 3. html-text to be displayed directly (no file) - * (this text must start with "<HTML>") - */ - public CFHelp(JFrame main_view, String fname, boolean big_size) { - super("Help"); // super constructor - - // set application icon - setIconImage(CGUIUtils.getIcon(IGUIConstants.APP_ICON).getImage()); - - Rectangle mvb = main_view.getBounds(); // get main view bounds - if (!big_size) { - setBounds(mvb.x + (mvb.width) / 2 - 260, mvb.y + 70, 520, 600); // standard - } else { - setBounds(mvb.x + (mvb.width) / 2 - 300, mvb.y + 70, 600, 750); // big size - } - - if (fname == null) { - fname = "start.html"; - } - - HtmlPane html; - if (fname.startsWith("<HTML>")) { - html = new HtmlPane("text/html", fname); // direct text - } else { - html = new HtmlPane(fname); // read html file - } - - setContentPane(html); - } -} - -class HtmlPane extends JScrollPane implements HyperlinkListener { - - private static final Logger log = Logger.getLogger(HtmlPane.class); - - JEditorPane html; - - private static final long serialVersionUID = 7957975761362660439L; - - /** - * Konstructor to load the html-file <fname> and display - * it's contents in this HtmlPane - * @param fname Name of the hmtl-file - */ - public HtmlPane(String fname) { - try { - // first looking for the html file in extracted form - File f = new File(IGUIConstants.HELP_DIR + File.separator + fname); - if (f.exists()) { - // file exists in expected directory - String s = f.getAbsolutePath(); - s = "file:" + s; - html = new JEditorPane(s); - } else { - // file missing, so let's look if we can get it from the jar - URL url = ClassLoader.getSystemResource(IGUIConstants.HELP_DIR.replace('\\', '/') + "/" + fname); - - if (url != null) { - html = new JEditorPane(url); - } else { - // let's try it again without first directory - if (log.isInfoEnabled()) { - log.info("trying: HelpFiles/" + fname); - } - url = ClassLoader.getSystemResource("HelpFiles/" + fname); - if (url != null) { - html = new JEditorPane(url); - } else { - if (log.isInfoEnabled()) { - log.info("Failed to open help file '" + fname + "'!"); - } - } - } - } - - html.setEditable(false); - html.addHyperlinkListener(this); - JViewport vp = getViewport(); - - // under windows, the content of the panel get detroyed after scrolling - // this will avoid this problem! - // but it will make the scrolling slower - // so test this! - this.getViewport().putClientProperty("EnableWindowBlit", new Boolean(true)); - vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - - vp.add(html); - setAutoscrolls(true); - } catch (NullPointerException e) { - // failed to open the html file - } catch (MalformedURLException e) { - log.warn("Malformed URL: ", e); - } catch (IOException e) { - log.warn("IOException: ", e); - } - } - - /** - * Konstructor to load the html-file <fname> and display - * it's contents in this HtmlPane - * @param type mime-type of the given text (e.g. "text/html") - * @param text text to display (can be html-text for example) - */ - public HtmlPane(String type, String text) { - // open new JEditorPane - html = new JEditorPane(type, text); - html.setEditable(false); - html.addHyperlinkListener(this); - JViewport vp = getViewport(); - - // under windows, the content of the panel get detroyed after scrolling - // this will avoid this problem! - // but it will make the scrolling slower - // so test this! - this.getViewport().putClientProperty("EnableWindowBlit", new Boolean(true)); - vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - - vp.add(html); - //vp.setView(html); - //vp.setViewPosition(new Point(0, 0)); - - setAutoscrolls(true); - } - - /** - * Notification of a change relative to a - * hyperlink. - * @param e occurred <code>HyperlinkEvent</code> - */ - public void hyperlinkUpdate(HyperlinkEvent e) { - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { - linkActivated(e.getURL()); - } - } - - /** - * Follows the reference in an - * link. The given url is the requested reference. - * By default this calls <a href="#setPage">setPage</a>, - * and if an exception is thrown the original previous - * document is restored and a beep sounded. If an - * attempt was made to follow a link, but it represented - * a malformed url, this method will be called with a - * null argument. - * @param u the URL to follow - */ - protected void linkActivated(URL u) { - Cursor c = html.getCursor(); - Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); - html.setCursor(waitCursor); - SwingUtilities.invokeLater(new PageLoader(u, c)); - } - - /** - * temporary class that loads synchronously (although - * later than the request so that a cursor change - * can be done). - */ - class PageLoader implements Runnable { - - PageLoader(URL u, Cursor c) { - url = u; - cursor = c; - } - - public void run() { - if (url == null) { - // restore the original cursor - html.setCursor(cursor); - - // PENDING(prinz) remove this hack when - // automatic validation is activated. - Container parent = html.getParent(); - parent.repaint(); - } else { - Document doc = html.getDocument(); - try { - html.setPage(url); - } catch (IOException ioe) { - html.setDocument(doc); - getToolkit().beep(); - } finally { - // schedule the cursor to revert after - // the paint has happended. - url = null; - SwingUtilities.invokeLater(this); - } - } - } - - URL url; - - Cursor cursor; - } -} Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-05-26 11:27:28 UTC (rev 28) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-05-26 16:46:56 UTC (rev 29) @@ -26,6 +26,7 @@ import cfeditor.arch.ArchObject; import cfeditor.arch.ArchObjectStack; +import cfeditor.help.CFHelp; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-05-26 11:27:28 UTC (rev 28) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-05-26 16:46:56 UTC (rev 29) @@ -25,6 +25,7 @@ package cfeditor; import cfeditor.arch.ArchObject; +import cfeditor.help.CFHelp; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; Modified: trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java 2006-05-26 11:27:28 UTC (rev 28) +++ trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java 2006-05-26 16:46:56 UTC (rev 29) @@ -51,6 +51,7 @@ import javax.swing.border.EmptyBorder; import javax.swing.border.EtchedBorder; import javax.swing.border.TitledBorder; +import cfeditor.help.CFHelp; /** * Dialog used to ask the user the properties for the new level. Added: trunk/crossfire/src/cfeditor/help/CFHelp.java =================================================================== --- trunk/crossfire/src/cfeditor/help/CFHelp.java (rev 0) +++ trunk/crossfire/src/cfeditor/help/CFHelp.java 2006-05-26 16:46:56 UTC (rev 29) @@ -0,0 +1,56 @@ +package cfeditor.help; + +import cfeditor.CGUIUtils; +import cfeditor.IGUIConstants; +import java.awt.Rectangle; +import javax.swing.JFrame; + +/** + * <code>CFHelp</code> implements the Help Window is a seperate frame with html content. + * @author <a href="mailto:mic...@no...">Michael Toennies</a> + * @author <a href="mailto:and...@gm...">Andreas Vogl</a> + * @deprecated We'll use JavaHelp instead. + */ +@Deprecated public class CFHelp extends JFrame { + + private static final long serialVersionUID = 6896632173566618870L; + + /** + * Konstructor + * @param mainView the main view + * @param bigSize if true, the frame gets bigger than normal + * (useful in combination with larger fonts) + * @param fname may contain different things: + * 1. null -> the file "start.html" is opened + * 2. File name of a html-file to be opened + * 3. html-text to be displayed directly (no file) + * (this text must start with "<HTML>") + */ + public CFHelp(final JFrame mainView, String fname, final boolean bigSize) { + super("Help"); // super constructor + + // set application icon + setIconImage(CGUIUtils.getIcon(IGUIConstants.APP_ICON).getImage()); + + final Rectangle mvb = mainView.getBounds(); // get main view bounds + if (bigSize) { + setBounds(mvb.x + (mvb.width >> 1) - 300, mvb.y + 70, 600, 750); // big size + } else { + setBounds(mvb.x + (mvb.width >> 1) - 260, mvb.y + 70, 520, 600); // standard + } + + if (fname == null) { + fname = "start.html"; + } + + final HtmlPane html; + if (fname.startsWith("<HTML>")) { + html = new HtmlPane("text/html", fname); // direct text + } else { + html = new HtmlPane(fname); // read html file + } + + setContentPane(html); + } + +} // class CFHelp Property changes on: trunk/crossfire/src/cfeditor/help/CFHelp.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Copied: trunk/crossfire/src/cfeditor/help/HtmlPane.java (from rev 27, trunk/crossfire/src/cfeditor/CFHelp.java) =================================================================== --- trunk/crossfire/src/cfeditor/help/HtmlPane.java (rev 0) +++ trunk/crossfire/src/cfeditor/help/HtmlPane.java 2006-05-26 16:46:56 UTC (rev 29) @@ -0,0 +1,212 @@ +/* + * Crossfire Java Editor. + * Copyright (C) 2000 Michael Toennies + * Copyright (C) 2001 Andreas Vogl + * + * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) + * + * 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 cfeditor.help; + +import java.awt.Container; +import java.awt.Cursor; +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.logging.Logger; +import java.util.logging.Level; +import javax.swing.JEditorPane; +import javax.swing.JScrollPane; +import javax.swing.JViewport; +import javax.swing.SwingUtilities; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.text.Document; +import cfeditor.IGUIConstants; + +class HtmlPane extends JScrollPane implements HyperlinkListener { + + private static final Logger log = Logger.getLogger("HtmlPane.class"); + + private static final long serialVersionUID = 7957975761362660439L; + + private JEditorPane html; + + /** + * Constructor to load the html-file <fname> and display + * it's contents in this HtmlPane. + * @param fname Name of the hmtl-file + */ + HtmlPane(final String fname) { + try { + // first looking for the html file in extracted form + final File f = new File(IGUIConstants.HELP_DIR + File.separator + fname); + if (f.exists()) { + // file exists in expected directory + final String s = "file:" + f.getAbsolutePath(); + html = new JEditorPane(s); + } else { + // file missing, so let's look if we can get it from the jar + URL url = ClassLoader.getSystemResource(IGUIConstants.HELP_DIR.replace('\\', '/') + "/" + fname); + + if (url != null) { + html = new JEditorPane(url); + } else { + // let's try it again without first directory + log.info("trying: HelpFiles/" + fname); + url = ClassLoader.getSystemResource("HelpFiles/" + fname); + if (url != null) { + html = new JEditorPane(url); + } else { + log.info("Failed to open help file '" + fname + "'!"); + html = new JEditorPane("text/plain", ""); + } + } + } + + html.setEditable(false); + html.addHyperlinkListener(this); + final JViewport vp = getViewport(); + + // under windows, the content of the panel get detroyed after scrolling + // this will avoid this problem! + // but it will make the scrolling slower + // so test this! + getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); + vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); + + vp.add(html); + setAutoscrolls(true); + } catch (NullPointerException e) { + // failed to open the html file + } catch (MalformedURLException e) { + log.log(Level.WARNING, "Malformed URL: %s", e); + } catch (IOException e) { + log.log(Level.WARNING, "IOException: %s", e); + } + } + + /** + * Konstructor to load the html-file <fname> and display + * it's contents in this HtmlPane + * @param type mime-type of the given text (e.g. "text/html") + * @param text text to display (can be html-text for example) + */ + HtmlPane(final String type, final String text) { + // open new JEditorPane + html = new JEditorPane(type, text); + html.setEditable(false); + html.addHyperlinkListener(this); + final JViewport vp = getViewport(); + + // under windows, the content of the panel get detroyed after scrolling + // this will avoid this problem! + // but it will make the scrolling slower + // so test this! + // XXX The main issue probably is extending JScrollPane (Cher) + getViewport().putClientProperty("EnableWindowBlit", Boolean.TRUE); + vp.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); + + vp.add(html); + //vp.setView(html); + //vp.setViewPosition(new Point(0, 0)); + + setAutoscrolls(true); + } + + /** + * Notification of a change relative to a + * hyperlink. + * @param e occurred <code>HyperlinkEvent</code> + */ + public void hyperlinkUpdate(final HyperlinkEvent e) { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + linkActivated(e.getURL()); + } + } + + /** + * Follows the reference in an + * link. The given url is the requested reference. + * By default this calls <a href="#setPage">setPage</a>, + * and if an exception is thrown the original previous + * document is restored and a beep sounded. If an + * attempt was made to follow a link, but it represented + * a malformed url, this method will be called with a + * null argument. + * @param u the URL to follow + */ + protected void linkActivated(final URL u) { + final Cursor c = html.getCursor(); + final Cursor waitCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); + html.setCursor(waitCursor); + SwingUtilities.invokeLater(new PageLoader(u, c)); + } + + /** + * Synchronuous page loader, loads a page and handles the cursor. + */ + private class PageLoader implements Runnable { + + /** URL to load. */ + private URL url; + + /** Original cursor that should be restored once the document is loaded. */ + private Cursor cursor; + + /** + * Create a PageLoader. + * @param url URL to load + * @param cursor Cursor to restore once the document is loaded + */ + private PageLoader(final URL url, final Cursor cursor) { + this.url = url; + this.cursor = cursor; + } + + /** {@inheritDoc} */ + public void run() { + if (url == null) { + // restore the original cursor + html.setCursor(cursor); + + // PENDING(prinz) remove this hack when + // automatic validation is activated. + final Container parent = html.getParent(); + parent.repaint(); + } else { + final Document doc = html.getDocument(); + try { + html.setPage(url); + } catch (final IOException ioe) { + html.setDocument(doc); + getToolkit().beep(); + } finally { + // schedule the cursor to revert after + // the paint has happended. + url = null; + SwingUtilities.invokeLater(this); + } + } + } + + } // class PageLoader + +} // class HtmlPane This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-26 11:27:36
|
Revision: 28 Author: christianhujer Date: 2006-05-26 04:27:28 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=28&view=rev Log Message: ----------- Deprecated CDialogBase. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CDialogBase.java Modified: trunk/crossfire/src/cfeditor/CDialogBase.java =================================================================== --- trunk/crossfire/src/cfeditor/CDialogBase.java 2006-05-26 10:55:45 UTC (rev 27) +++ trunk/crossfire/src/cfeditor/CDialogBase.java 2006-05-26 11:27:28 UTC (rev 28) @@ -30,39 +30,45 @@ import java.awt.Toolkit; import java.awt.Window; import javax.swing.JDialog; +import javax.swing.JOptionPane; /** * <code>CDialogBase</code> is the baseclass for dialogs that center * on to their parent or to the screen if no parent is given. * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:Mic...@ha...">Michael Keuchen</a> + * @deprecated This class shouldn't be used any longer, instead, {@link JOptionPane} should be used, as it not only centers, but also handles escape key, default button etc.. */ -public class CDialogBase extends JDialog { +@Deprecated public abstract class CDialogBase extends JDialog { private static final long serialVersionUID = -625386596453840074L; - public CDialogBase(Frame parentFrame, String title) { + /** + * Create a CDialogBase. + * @param parentFrame Frame to center on + * @param title Title for dialog window + */ + protected CDialogBase(final Frame parentFrame, final String title) { super(parentFrame, title); } /** Centers this dialog when showing. */ - public void setVisible(boolean visible) { + @Override public void setVisible(final boolean visible) { if (visible) { - Window owner = getOwner(); - Rectangle ownerBounds; + final Window owner = getOwner(); + final Rectangle ownerBounds; if (owner != null) { ownerBounds = owner.getBounds(); } else { ownerBounds = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()); } - Dimension ownSize = getSize(); - Rectangle ownBounds = new Rectangle(ownSize); - ownBounds.x = ownerBounds.x + (ownerBounds.width - ownSize.width) / 2; - ownBounds.y = ownerBounds.y + (ownerBounds.height - ownSize.height) / 2; + final Dimension ownSize = getSize(); + final Rectangle ownBounds = new Rectangle(ownSize); + ownBounds.x = ownerBounds.x + (ownerBounds.width - ownSize.width >> 1); + ownBounds.y = ownerBounds.y + (ownerBounds.height - ownSize.height >> 1); setBounds(ownBounds); - super.setVisible(true); - } else { - super.setVisible(false); } + super.setVisible(visible); } -} + +} // class CDialogBase This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-26 11:01:31
|
Revision: 27 Author: christianhujer Date: 2006-05-26 03:55:45 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=27&view=rev Log Message: ----------- Applied automatic code formatting. Modified Paths: -------------- trunk/crossfire/src/cfeditor/AutojoinList.java trunk/crossfire/src/cfeditor/BshThread.java trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CArchPanelPan.java trunk/crossfire/src/cfeditor/CArchQuickView.java trunk/crossfire/src/cfeditor/CAttribBitmask.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CDialogBase.java trunk/crossfire/src/cfeditor/CFArchAttrib.java trunk/crossfire/src/cfeditor/CFArchType.java trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/crossfire/src/cfeditor/CFHelp.java trunk/crossfire/src/cfeditor/CFJavaEditor.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CFancyButton.java trunk/crossfire/src/cfeditor/CFileInputStream.java trunk/crossfire/src/cfeditor/CFileReader.java trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/CGUIUtils.java trunk/crossfire/src/cfeditor/CGridderException.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainMenu.java trunk/crossfire/src/cfeditor/CMainStatusbar.java trunk/crossfire/src/cfeditor/CMainToolbar.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CMapControl.java trunk/crossfire/src/cfeditor/CMapFileDecode.java trunk/crossfire/src/cfeditor/CMapFileEncode.java trunk/crossfire/src/cfeditor/CMapModel.java trunk/crossfire/src/cfeditor/CMapPropertiesDialog.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/CMapViewIFrame.java trunk/crossfire/src/cfeditor/CMapViewInterface.java trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/COptionDialog.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/CResourceLoader.java trunk/crossfire/src/cfeditor/CScriptController.java trunk/crossfire/src/cfeditor/CScriptModel.java trunk/crossfire/src/cfeditor/CScriptView.java trunk/crossfire/src/cfeditor/CSettings.java trunk/crossfire/src/cfeditor/CStartupScreen.java trunk/crossfire/src/cfeditor/CUndoStack.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/ExitTypes.java trunk/crossfire/src/cfeditor/FaceObject.java trunk/crossfire/src/cfeditor/IGUIConstants.java trunk/crossfire/src/cfeditor/IUndoable.java trunk/crossfire/src/cfeditor/IdGenerator.java trunk/crossfire/src/cfeditor/JFontChooser.java trunk/crossfire/src/cfeditor/JarResources.java trunk/crossfire/src/cfeditor/MapArchObject.java trunk/crossfire/src/cfeditor/MultiArchData.java trunk/crossfire/src/cfeditor/MultiPositionData.java trunk/crossfire/src/cfeditor/PluginParameter.java trunk/crossfire/src/cfeditor/PluginParameterFactory.java trunk/crossfire/src/cfeditor/PluginParameterView.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/crossfire/src/cfeditor/TrackedBufferedInputStream.java trunk/crossfire/src/cfeditor/arch/ArchObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectIterator.java trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteArchMapObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteMapArch.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java trunk/crossfire/src/cfeditor/filter/AttributeFilter.java trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java trunk/crossfire/src/cfeditor/filter/ConfigEvent.java trunk/crossfire/src/cfeditor/filter/ConfigListener.java trunk/crossfire/src/cfeditor/filter/Filter.java trunk/crossfire/src/cfeditor/filter/FilterConfig.java trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java trunk/crossfire/src/cfeditor/filter/NamedFilterEvent.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/crossfire/src/cfeditor/filter/NamedFilterListener.java trunk/crossfire/src/cfeditor/filter/SimpleFilterConfig.java trunk/crossfire/src/cfeditor/gui/ArchComboBox.java trunk/crossfire/src/cfeditor/gui/CloseableTabbedPane.java trunk/crossfire/src/cfeditor/gui/ScriptEditor.java trunk/crossfire/src/cfeditor/gui/ScriptManager.java trunk/crossfire/src/cfeditor/gui/StackLayout.java trunk/crossfire/src/cfeditor/menu/AggregateMenuLocation.java trunk/crossfire/src/cfeditor/menu/BasicAction.java trunk/crossfire/src/cfeditor/menu/BasicMenuEntry.java trunk/crossfire/src/cfeditor/menu/CheckBoxMenuEntry.java trunk/crossfire/src/cfeditor/menu/FilterCheckBoxEntry.java trunk/crossfire/src/cfeditor/menu/LocationMenuEntry.java trunk/crossfire/src/cfeditor/menu/MenuChangeEvent.java trunk/crossfire/src/cfeditor/menu/MenuEntry.java trunk/crossfire/src/cfeditor/menu/MenuGroup.java trunk/crossfire/src/cfeditor/menu/MenuHelper.java trunk/crossfire/src/cfeditor/menu/MenuListener.java trunk/crossfire/src/cfeditor/menu/MenuLocation.java trunk/crossfire/src/cfeditor/menu/MenuManager.java trunk/crossfire/src/cfeditor/menu/SeparatorMenuEntry.java trunk/crossfire/src/cfeditor/menu/SimpleMenuEntry.java trunk/crossfire/src/cfeditor/menu/SimpleMenuLocation.java trunk/crossfire/src/cfeditor/menu/SwitchedMenuEntry.java trunk/crossfire/src/cfeditor/parameter/ArchParameter.java trunk/crossfire/src/cfeditor/parameter/ArchParameterView.java trunk/crossfire/src/cfeditor/parameter/BooleanParameter.java trunk/crossfire/src/cfeditor/parameter/BooleanParameterView.java trunk/crossfire/src/cfeditor/parameter/DoubleParameter.java trunk/crossfire/src/cfeditor/parameter/DoubleParameterView.java trunk/crossfire/src/cfeditor/parameter/FilterParameter.java trunk/crossfire/src/cfeditor/parameter/FilterParameterView.java trunk/crossfire/src/cfeditor/parameter/IntegerParameter.java trunk/crossfire/src/cfeditor/parameter/IntegerParameterView.java trunk/crossfire/src/cfeditor/parameter/MapParameter.java trunk/crossfire/src/cfeditor/parameter/MapParameterView.java trunk/crossfire/src/cfeditor/parameter/ParameterDescriptionEditor.java trunk/crossfire/src/cfeditor/parameter/ParameterNameEditor.java trunk/crossfire/src/cfeditor/parameter/ParameterTypeEditor.java trunk/crossfire/src/cfeditor/parameter/StringParameter.java trunk/crossfire/src/cfeditor/parameter/StringParameterView.java trunk/crossfire/src/cfeditor/textedit/scripteditor/CFPythonPopup.java trunk/crossfire/src/cfeditor/textedit/scripteditor/ScriptEditControl.java trunk/crossfire/src/cfeditor/textedit/scripteditor/ScriptEditMenuBar.java trunk/crossfire/src/cfeditor/textedit/scripteditor/ScriptEditView.java trunk/crossfire/src/cfeditor/textedit/textarea/CTokenMarker.java trunk/crossfire/src/cfeditor/textedit/textarea/DefaultInputHandler.java trunk/crossfire/src/cfeditor/textedit/textarea/HTMLTokenMarker.java trunk/crossfire/src/cfeditor/textedit/textarea/InputHandler.java trunk/crossfire/src/cfeditor/textedit/textarea/JEditTextArea.java trunk/crossfire/src/cfeditor/textedit/textarea/JavaScriptTokenMarker.java trunk/crossfire/src/cfeditor/textedit/textarea/KeywordMap.java trunk/crossfire/src/cfeditor/textedit/textarea/PythonTokenMarker.java trunk/crossfire/src/cfeditor/textedit/textarea/SyntaxDocument.java trunk/crossfire/src/cfeditor/textedit/textarea/SyntaxStyle.java trunk/crossfire/src/cfeditor/textedit/textarea/SyntaxUtilities.java trunk/crossfire/src/cfeditor/textedit/textarea/TextAreaDefaults.java trunk/crossfire/src/cfeditor/textedit/textarea/TextAreaPainter.java trunk/crossfire/src/cfeditor/textedit/textarea/TextUtilities.java trunk/crossfire/src/cfeditor/textedit/textarea/Token.java trunk/crossfire/src/cfeditor/textedit/textarea/TokenMarker.java trunk/crossfire/src/cfeditor/textedit/textarea/XMLTokenMarker.java trunk/daimonin/src/daieditor/ArchUpdater.java trunk/daimonin/src/daieditor/CArchPanel.java trunk/daimonin/src/daieditor/CArchPanelPan.java trunk/daimonin/src/daieditor/CArchQuickView.java trunk/daimonin/src/daieditor/CAttribBitmask.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CFArchAttrib.java trunk/daimonin/src/daieditor/CFArchType.java trunk/daimonin/src/daieditor/CFArchTypeList.java trunk/daimonin/src/daieditor/CFJavaEditor.java trunk/daimonin/src/daieditor/CFTreasureListTree.java trunk/daimonin/src/daieditor/CFileInputStream.java trunk/daimonin/src/daieditor/CFileReader.java trunk/daimonin/src/daieditor/CGUIUtils.java trunk/daimonin/src/daieditor/CGridderException.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMainStatusbar.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapFileDecode.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CMapViewBasic.java trunk/daimonin/src/daieditor/CMapViewIFrame.java trunk/daimonin/src/daieditor/CNewMapDialog.java trunk/daimonin/src/daieditor/CPickmapPanel.java trunk/daimonin/src/daieditor/CPreview.java trunk/daimonin/src/daieditor/CUndoStack.java trunk/daimonin/src/daieditor/CopyBuffer.java trunk/daimonin/src/daieditor/IGUIConstants.java trunk/daimonin/src/daieditor/IUndoable.java trunk/daimonin/src/daieditor/MapTilePane.java trunk/daimonin/src/daieditor/MultiArchData.java trunk/daimonin/src/daieditor/MultiPositionData.java trunk/daimonin/src/daieditor/PathManager.java trunk/daimonin/src/daieditor/ProcessRunner.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/ResourceFileManager.java trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/Spells.java trunk/daimonin/src/daieditor/SplashScreen.java trunk/daimonin/src/daieditor/Updater.java trunk/daimonin/src/daieditor/arch/ArchAttribType.java trunk/daimonin/src/daieditor/arch/ArchObject.java trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java trunk/daimonin/src/daieditor/arch/ArchObjectIterator.java trunk/daimonin/src/daieditor/arch/ArchObjectParser.java trunk/daimonin/src/daieditor/arch/ArchObjectStack.java trunk/daimonin/src/daieditor/arch/DuplicateArchException.java trunk/daimonin/src/daieditor/arch/NamedObject.java trunk/daimonin/src/daieditor/arch/NamedObjects.java trunk/daimonin/src/daieditor/arch/NamedTreeNode.java trunk/daimonin/src/daieditor/arch/RecursiveArchObjectIterator.java trunk/daimonin/src/daieditor/arch/anim/AnimationObject.java trunk/daimonin/src/daieditor/arch/anim/AnimationObjects.java trunk/daimonin/src/daieditor/arch/anim/AnimationParseException.java trunk/daimonin/src/daieditor/arch/anim/DuplicateAnimationException.java trunk/daimonin/src/daieditor/arch/face/DuplicateFaceException.java trunk/daimonin/src/daieditor/arch/face/FaceFacade.java trunk/daimonin/src/daieditor/arch/face/FaceObject.java trunk/daimonin/src/daieditor/arch/face/FaceObjects.java trunk/daimonin/src/daieditor/arch/match/AndArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ArchObjectMatchers.java trunk/daimonin/src/daieditor/arch/match/AttribArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/MutableNameArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/MutableOrArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/NamedArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/NotArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/OrArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/TypeNrsArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ViewArchObjectMatcherManager.java trunk/daimonin/src/daieditor/gui/AboutDialog.java trunk/daimonin/src/daieditor/gui/ConnectionView.java trunk/daimonin/src/daieditor/gui/DirectionLayout.java trunk/daimonin/src/daieditor/gui/ErrorListView.java trunk/daimonin/src/daieditor/gui/HideFileFilterProxy.java trunk/daimonin/src/daieditor/gui/MapFileFilter.java trunk/daimonin/src/daieditor/gui/map/LevelRenderer.java trunk/daimonin/src/daieditor/gui/map/MapCursor.java trunk/daimonin/src/daieditor/gui/map/MapCursorControl.java trunk/daimonin/src/daieditor/gui/map/MapCursorEvent.java trunk/daimonin/src/daieditor/gui/map/MapCursorListener.java trunk/daimonin/src/daieditor/gui/map/MapGrid.java trunk/daimonin/src/daieditor/gui/map/MapGridEvent.java trunk/daimonin/src/daieditor/gui/map/MapGridListener.java trunk/daimonin/src/daieditor/gui/map/MapPreviewAccessory.java trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java trunk/daimonin/src/daieditor/gui/map/MapTilePane.java trunk/daimonin/src/daieditor/gui/map/MapUserListener.java trunk/daimonin/src/daieditor/gui/map/MapViewSettings.java trunk/daimonin/src/daieditor/gui/map/MapViewSettingsEvent.java trunk/daimonin/src/daieditor/gui/map/MapViewSettingsListener.java trunk/daimonin/src/daieditor/gui/prefs/AppPrefs.java trunk/daimonin/src/daieditor/gui/prefs/DevPrefs.java trunk/daimonin/src/daieditor/gui/prefs/GUIPrefs.java trunk/daimonin/src/daieditor/gui/prefs/MapValidatorPrefs.java trunk/daimonin/src/daieditor/gui/prefs/MiscPrefs.java trunk/daimonin/src/daieditor/gui/prefs/NetPrefs.java trunk/daimonin/src/daieditor/gui/prefs/ResPrefs.java trunk/daimonin/src/daieditor/gui/prefs/UpdatePrefs.java trunk/daimonin/src/daieditor/help/DHelp.java trunk/daimonin/src/daieditor/icons/AbstractFaceProvider.java trunk/daimonin/src/daieditor/icons/ArchFaceProvider.java trunk/daimonin/src/daieditor/icons/DaimoninFaceProvider.java trunk/daimonin/src/daieditor/icons/FaceProvider.java trunk/daimonin/src/daieditor/icons/FilterFaceProvider.java trunk/daimonin/src/daieditor/map/ArchOutOfMapBoundsException.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapArchObject.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/daimonin/src/daieditor/map/MapEvent.java trunk/daimonin/src/daieditor/map/MapListener.java trunk/daimonin/src/daieditor/map/MapModel.java trunk/daimonin/src/daieditor/map/MapModelEvent.java trunk/daimonin/src/daieditor/map/MapModelListener.java trunk/daimonin/src/daieditor/map/MapSquare.java trunk/daimonin/src/daieditor/map/validation/AbstractValidator.java trunk/daimonin/src/daieditor/map/validation/ArchValidationError.java trunk/daimonin/src/daieditor/map/validation/ArchValidator.java trunk/daimonin/src/daieditor/map/validation/ArchesValidationError.java trunk/daimonin/src/daieditor/map/validation/CorrectableError.java trunk/daimonin/src/daieditor/map/validation/DefaultErrorCollector.java trunk/daimonin/src/daieditor/map/validation/DelegatingMapValidator.java trunk/daimonin/src/daieditor/map/validation/ErrorCollector.java trunk/daimonin/src/daieditor/map/validation/ErrorHandler.java trunk/daimonin/src/daieditor/map/validation/MapValidationError.java trunk/daimonin/src/daieditor/map/validation/MapValidator.java trunk/daimonin/src/daieditor/map/validation/SquareValidationError.java trunk/daimonin/src/daieditor/map/validation/SquareValidator.java trunk/daimonin/src/daieditor/map/validation/ValidationError.java trunk/daimonin/src/daieditor/map/validation/Validator.java trunk/daimonin/src/daieditor/map/validation/checks/BlockedMobOrSpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/BlockedMobOrSpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedInsideContainerChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedInsideContainerError.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedPickableChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedPickableError.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleArchChecker.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleArchError.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleLayerChecker.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleLayerError.java trunk/daimonin/src/daieditor/map/validation/checks/EmptySpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/EmptySpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/ExitChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ExitError.java trunk/daimonin/src/daieditor/map/validation/checks/MobOutsideSpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/MobOutsideSpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/SlayingChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SlayingError.java trunk/daimonin/src/daieditor/map/validation/checks/SquareWithoutFloorChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SquareWithoutFloorError.java trunk/daimonin/src/daieditor/map/validation/checks/SysObjectOnLayerZeroChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SysObjectOnLayerZeroError.java trunk/daimonin/src/daieditor/map/validation/checks/TilePathsChecker.java trunk/daimonin/src/daieditor/map/validation/checks/TilePathsError.java trunk/daimonin/src/daieditor/swing/DSplitPane.java trunk/daimonin/src/daieditor/textedit/scripteditor/CFPythonPopup.java trunk/daimonin/src/daieditor/textedit/scripteditor/ScriptEditControl.java trunk/daimonin/src/daieditor/textedit/scripteditor/ScriptEditMenuBar.java trunk/daimonin/src/daieditor/textedit/scripteditor/ScriptEditView.java trunk/daimonin/src/daieditor/textedit/textarea/CTokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/DefaultInputHandler.java trunk/daimonin/src/daieditor/textedit/textarea/HTMLTokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/InputHandler.java trunk/daimonin/src/daieditor/textedit/textarea/JEditTextArea.java trunk/daimonin/src/daieditor/textedit/textarea/JavaScriptTokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/KeywordMap.java trunk/daimonin/src/daieditor/textedit/textarea/LuaTokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/SyntaxDocument.java trunk/daimonin/src/daieditor/textedit/textarea/SyntaxStyle.java trunk/daimonin/src/daieditor/textedit/textarea/SyntaxUtilities.java trunk/daimonin/src/daieditor/textedit/textarea/TextAreaDefaults.java trunk/daimonin/src/daieditor/textedit/textarea/TextAreaPainter.java trunk/daimonin/src/daieditor/textedit/textarea/TextUtilities.java trunk/daimonin/src/daieditor/textedit/textarea/Token.java trunk/daimonin/src/daieditor/textedit/textarea/TokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/XMLTokenMarker.java Modified: trunk/crossfire/src/cfeditor/AutojoinList.java =================================================================== --- trunk/crossfire/src/cfeditor/AutojoinList.java 2006-05-26 10:23:05 UTC (rev 26) +++ trunk/crossfire/src/cfeditor/AutojoinList.java 2006-05-26 10:55:45 UTC (rev 27) @@ -34,18 +34,21 @@ /** * The <code>AutojoinList</code> class contains a list of (typically wall-)arches which * do autojoining. - * * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ public class AutojoinList { + private static final Logger log = Logger.getLogger(AutojoinList.class); private static final String filename = "autojoin.txt"; // file with autojoin lists // bitmask constants for nodenr index private static final int NORTH = 1; + private static final int EAST = 2; + private static final int SOUTH = 4; + private static final int WEST = 8; private ArchObjectStack stack; // reference to the stack of default arches @@ -58,10 +61,8 @@ // (0 = no connection, N = north, E = east, S = south, W = west) private int[] nodenr; - /** - * Konstructor - */ - public AutojoinList () { + /** Konstructor */ + public AutojoinList() { stack = null; // pointer to stack of default arches next = null; // pointer to next element nodenr = null; // this array gets initialized in loadList (when needed) @@ -73,11 +74,10 @@ * to the (head) instance which it is called from. * The links from the default arches to their appropriate * AutojoinLists also get set here. - * + * <p/> * Note that this method takes only split seconds to execute, * as it uses the arch hashtable to look up the default arches. :-) - * - * @param archstack the stack of default arches + * @param archstack the stack of default arches * @return true if at least one autojoin list was successfully loaded */ public boolean loadList(ArchObjectStack archstack) { @@ -89,10 +89,10 @@ int[] nbuf = new int[16]; // buffer for nodenumbers of 16 arches int count = 0; // counter index AutojoinList jlist = this; // index of the linked list of AutojoinLists - // (starting at 'this') + // (starting at 'this') // open the resource file - String baseDir = (IGUIConstants.isoView ? CMainControl.getInstance().getArchDefaultFolder()+File.separator+IGUIConstants.CONFIG_DIR : IGUIConstants.CONFIG_DIR); + String baseDir = (IGUIConstants.isoView ? CMainControl.getInstance().getArchDefaultFolder() + File.separator + IGUIConstants.CONFIG_DIR : IGUIConstants.CONFIG_DIR); CFileReader stream = new CFileReader(baseDir, filename); // read the file @@ -123,15 +123,15 @@ jlist.nodenr[i] = nbuf[i]; // store nodenr. in the list archstack.getArch(nbuf[i]).setJoinList(jlist); // set the link in the def. arch if (log.isDebugEnabled()) { - log.debug("("+i+") arch: '"+archstack.getArch(nbuf[i]).getArchName()+"' -> nr: ("+nbuf[i]+")"); + log.debug("(" + i + ") arch: '" + archstack.getArch(nbuf[i]).getArchName() + "' -> nr: (" + nbuf[i] + ")"); } } success = true; // we did it! } else if (count > 16) { - log.warn("In file "+filename+": List with more than 16 valid entries!"); + log.warn("In file " + filename + ": List with more than 16 valid entries!"); } else if (archstack.getArchCount() >= 1) { - log.warn("In file "+filename+": List with less than 16 valid entries!"); + log.warn("In file " + filename + ": List with less than 16 valid entries!"); } section_flag = false; } else if (count < 16) { @@ -147,17 +147,17 @@ if (!archstack.getArch(nbuf[count]).isMulti()) { count++; // no multipart, this one's okay } else { - log.warn("In file "+filename+": Arch '"+line+"' is a multipart."); + log.warn("In file " + filename + ": Arch '" + line + "' is a multipart."); } } else { // (If no arches exist at all, errormessages are suppressed here) if (archstack.getArchCount() >= 1) { - log.warn("In file "+filename+": Arch '"+line+"' not found."); + log.warn("In file " + filename + ": Arch '" + line + "' not found."); } } } catch (NumberFormatException e) { // parsing failed (should not happen) - log.error("ArchObjectStack Hashtable entry '"+entry.toString()+"' not parseable as int!", e); + log.error("ArchObjectStack Hashtable entry '" + entry.toString() + "' not parseable as int!", e); } } else { count++; // too many arches @@ -170,11 +170,11 @@ stream.close(); } catch (FileNotFoundException e) { if (log.isInfoEnabled()) { - log.info("Autojoin definitions file '"+filename+"' not found."); + log.info("Autojoin definitions file '" + filename + "' not found."); } return false; } catch (IOException e) { - log.warn("Read error in file '"+filename+"'."); + log.warn("Read error in file '" + filename + "'."); return false; } @@ -191,11 +191,9 @@ * node_nr of the correct arch to be inserted is returned. * This method must be called from the appropriate element of the * AutojoinList, best use the link from the default arch. - * - * @param x Location of the insert point on the map - * @param y Location of the insert point on the map - * @param map Data model of the map - * + * @param x Location of the insert point on the map + * @param y Location of the insert point on the map + * @param map Data model of the map * @return node_nr of the (def.) arch to be inserted at x, y * -1 if there's already an arch of this list on x, y */ @@ -209,29 +207,29 @@ } // now do the joining in all four directions: - if (map.pointValid(x, y-1)) { - if ((arch = findArchOfJoinlist(map, x, y-1)) != null) { + if (map.pointValid(x, y - 1)) { + if ((arch = findArchOfJoinlist(map, x, y - 1)) != null) { new_index = add_dir(new_index, NORTH); connectArch(arch, nodenr[add_dir(get_index(arch.getNodeNr()), SOUTH)]); } } - if (map.pointValid(x+1, y)) { - if ((arch = findArchOfJoinlist(map, x+1, y)) != null) { + if (map.pointValid(x + 1, y)) { + if ((arch = findArchOfJoinlist(map, x + 1, y)) != null) { new_index = add_dir(new_index, EAST); connectArch(arch, nodenr[add_dir(get_index(arch.getNodeNr()), WEST)]); } } - if (map.pointValid(x, y+1)) { - if ((arch = findArchOfJoinlist(map, x, y+1)) != null) { + if (map.pointValid(x, y + 1)) { + if ((arch = findArchOfJoinlist(map, x, y + 1)) != null) { new_index = add_dir(new_index, SOUTH); connectArch(arch, nodenr[add_dir(get_index(arch.getNodeNr()), NORTH)]); } } - if (map.pointValid(x-1, y)) { - if ((arch = findArchOfJoinlist(map, x-1, y)) != null) { + if (map.pointValid(x - 1, y)) { + if ((arch = findArchOfJoinlist(map, x - 1, y)) != null) { new_index = add_dir(new_index, WEST); connectArch(arch, nodenr[add_dir(get_index(arch.getNodeNr()), EAST)]); } @@ -245,35 +243,34 @@ * All arches around the insert point get adjusted. * This method must be called from the appropriate element of the * AutojoinList, best use the link from the default arch. - * - * @param x Location of the insert point on the map - * @param y Location of the insert point on the map - * @param map Data model of the map + * @param x Location of the insert point on the map + * @param y Location of the insert point on the map + * @param map Data model of the map */ public void join_delete(CMapModel map, int x, int y) { ArchObject arch = null; // temp. arch // do the joining in all four directions: - if (map.pointValid(x, y-1)) { - if ((arch = findArchOfJoinlist(map, x, y-1)) != null) { + if (map.pointValid(x, y - 1)) { + if ((arch = findArchOfJoinlist(map, x, y - 1)) != null) { connectArch(arch, nodenr[remove_dir(get_index(arch.getNodeNr()), SOUTH)]); } } - if (map.pointValid(x+1, y)) { - if ((arch = findArchOfJoinlist(map, x+1, y)) != null) { + if (map.pointValid(x + 1, y)) { + if ((arch = findArchOfJoinlist(map, x + 1, y)) != null) { connectArch(arch, nodenr[remove_dir(get_index(arch.getNodeNr()), WEST)]); } } - if (map.pointValid(x, y+1)) { - if ((arch = findArchOfJoinlist(map, x, y+1)) != null) { + if (map.pointValid(x, y + 1)) { + if ((arch = findArchOfJoinlist(map, x, y + 1)) != null) { connectArch(arch, nodenr[remove_dir(get_index(arch.getNodeNr()), NORTH)]); } } - if (map.pointValid(x-1, y)) { - if ((arch = findArchOfJoinlist(map, x-1, y)) != null) { + if (map.pointValid(x - 1, y)) { + if ((arch = findArchOfJoinlist(map, x - 1, y)) != null) { connectArch(arch, nodenr[remove_dir(get_index(arch.getNodeNr()), EAST)]); } } @@ -281,14 +278,15 @@ /** * Looking up the given node in the nodenr-array of this class. - * - * @param node node to lookup + * @param node node to lookup * @return index of the node in the array. */ private int get_index(int node) { int i; - for (i = 0; i < 16 && node != nodenr[i]; i++); + for (i = 0; i < 16 && node != nodenr[i]; i++) { + ; + } if (node != nodenr[i]) { log.warn("Error in AutojoinList.get_index: index not found"); @@ -298,34 +296,27 @@ return i; } - /** - * Checks if the index (=bitmask) contains the following direction - */ + /** Checks if the index (=bitmask) contains the following direction */ private boolean has_dir(int index, int direction) { - return (index&direction) != 0; + return (index & direction) != 0; } - /** - * add direction to the index - */ + /** add direction to the index */ private int add_dir(int index, int direction) { - return index|direction; + return index | direction; } - /** - * remove direction from the index - */ + /** remove direction from the index */ private int remove_dir(int index, int direction) { - return index&~direction; + return index & ~direction; } /** * Looks for an arch at map-position (x, y) which is part * of this AutojoinList. - * - * @param map the data model of the map - * @param x location to search - * @param y location to search + * @param map the data model of the map + * @param x location to search + * @param y location to search * @return arch which is part of this joinlist, null if no such arch exists */ private ArchObject findArchOfJoinlist(CMapModel map, int x, int y) { Modified: trunk/crossfire/src/cfeditor/BshThread.java =================================================================== --- trunk/crossfire/src/cfeditor/BshThread.java 2006-05-26 10:23:05 UTC (rev 26) +++ trunk/crossfire/src/cfeditor/BshThread.java 2006-05-26 10:55:45 UTC (rev 27) @@ -4,6 +4,7 @@ * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ + package cfeditor; import bsh.EvalError; @@ -11,14 +12,16 @@ /** * @author tchize - * - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments + * <p/> + * To change the template for this generated type comment go to + * Window>Preferences>Java>Code Generation>Code and Comments */ public class BshThread extends Thread { private CScriptModel script; + private Interpreter interpreter; + /** * */ @@ -26,9 +29,7 @@ super(); } - /** - * @param name - */ + /** @param name */ public BshThread(String name) { super(name); } @@ -41,7 +42,7 @@ super(group, name); } - public void setInterpreter (Interpreter interpreter) { + public void setInterpreter(Interpreter interpreter) { this.interpreter = interpreter; } Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-05-26 10:23:05 UTC (rev 26) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-05-26 10:55:45 UTC (rev 27) @@ -38,23 +38,32 @@ /** * The <code>CArchPanel</code> holds the tile palette. - * * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ public class CArchPanel extends JPanel { + private static final String ARCHPANEL_LOCATION_KEY = "MainWindowArchPanel.dividerLocation"; + /** Controller of this subview. */ private final CMainControl m_control; + /** The "Import..." button. */ private int selectedArch; + private final JTabbedPane m_archAndPickPane; // panel holding both archlist and pickmaps + private final CSplitPane m_splitPane; // our split pane + private final JTabbedPane m_tabDesktop; // the tab panel with arch lists + private final CArchQuickView archQuickPanel; // data/view of selected objects in tab panel + private static PanelNode panelNodeStart; // list of arch panels + private PanelNode panelNodeLast; + private CArchPanelPan m_selectedPanel; // the active panel private static final long serialVersionUID = 6634110300452920361L; @@ -87,7 +96,7 @@ // calculate default value in case there is no settings file Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); - int divLocation = Integer.parseInt(settings.getProperty(ARCHPANEL_LOCATION_KEY, ""+(int)(0.77*0.9*screen.getHeight()))); + int divLocation = Integer.parseInt(settings.getProperty(ARCHPANEL_LOCATION_KEY, "" + (int) (0.77 * 0.9 * screen.getHeight()))); m_splitPane.setDividerLocation(divLocation); m_splitPane.setDividerSize(5); @@ -96,7 +105,7 @@ // we must set the list of the selected list depend on combo selection m_tabDesktop.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { - JTabbedPane tp = (JTabbedPane)e.getSource(); + JTabbedPane tp = (JTabbedPane) e.getSource(); // This is weird: we need to compare against SelectedComponent, // and *not* SelectedIndex. The index seemed to get all messed up during @@ -119,9 +128,7 @@ return panelNodeStart; } - /** - * Move the pickmap panel in front of the default-archpanel - */ + /** Move the pickmap panel in front of the default-archpanel */ public void movePickmapPanelToFront() { if (m_archAndPickPane != null && m_archAndPickPane.getTabCount() > 1) { m_archAndPickPane.setSelectedIndex(1); @@ -177,7 +184,9 @@ // insert new panels in alphabetical order int i; - for (i = 0; i < m_tabDesktop.getTabCount() && name.compareToIgnoreCase(m_tabDesktop.getTitleAt(i)) < 0; i++); + for (i = 0; i < m_tabDesktop.getTabCount() && name.compareToIgnoreCase(m_tabDesktop.getTitleAt(i)) < 0; i++) { + ; + } this.m_tabDesktop.insertTab(name, null, newnode.data.getPanel(), null, i); // careful: during the build proccess we are setting 'm_selectedPanel' @@ -205,7 +214,7 @@ void appExitNotify() { CSettings settings = CSettings.getInstance(IGUIConstants.APP_NAME); - settings.setProperty(ARCHPANEL_LOCATION_KEY, ""+m_splitPane.getDividerLocation()); + settings.setProperty(ARCHPANEL_LOCATION_KEY, "" + m_splitPane.getDividerLocation()); } public int getPanelArch() { @@ -227,8 +236,11 @@ } public class PanelNode { + public CArchPanelPan data; + public PanelNode next; // next node + String title; // title of this PanelNode public PanelNode(CArchPanelPan data, String title) { @@ -242,10 +254,9 @@ } } - /** - * Splitpane class that keeps its size even upon L'n'F change. - */ + /** Splitpane class that keeps its size even upon L'n'F change. */ public class CSplitPane extends JSplitPane { + private static final long serialVersionUID = -2537906454141191712L; public CSplitPane(int newOrientation, Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-05-26 10:23:05 UTC (rev 26) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-05-26 10:55:45 UTC (rev 27) @@ -43,17 +43,26 @@ import org.apache.log4j.Logger; public class CArchPanelPan extends JPanel { + private static final Logger log = Logger.getLogger(CArchPanel.class); + /** Controller of this subview. */ private final CMainControl m_control; private final JList m_list; + private final DefaultListModel model; + private final JPanel m_panelDesktop; + private final JComboBox jbox; + private final StringBuffer list; + private int listcounter; + private int combo_counter; + private final CArchPanel m_panel; private static final long serialVersionUID = 8690200410771201444L; @@ -103,7 +112,7 @@ // In JDK 1.4 it is required to transfer focus back to mapview after // every click in the panel, otherwise the menu-shortcuts stop working if (m_control.getCurrentMap() != null && - m_control.getCurrentMap().getMapView() != null) { + m_control.getCurrentMap().getMapView() != null) { m_control.getCurrentMap().getMapView().requestFocus(); // focus to mapview } } @@ -134,7 +143,8 @@ This happens in JDK 1.4 when you select an arch in panel A, then select Panel B, then Panel A again. (why??) */ - } catch (NumberFormatException e) {} + } catch (NumberFormatException e) { + } } m_control.showArchPanelQuickObject(arch); // send it to quick view } @@ -145,11 +155,11 @@ String def = "00000"; String num = Integer.toString(archnr); - this.list.append(def.substring(0, 5-num.length())); + this.list.append(def.substring(0, 5 - num.length())); this.list.append(num); num = Integer.toString(index); - this.list.append(def.substring(0, 5-num.length())); + this.list.append(def.substring(0, 5 - num.length())); this.list.append(num); this.listcounter++; @@ -180,10 +190,10 @@ * @return an array of nodenumbers from all arches in this panel */ public int[] getListNodeNrArray() { - int[] numList = new int[(int)(list.length()/10.)]; + int[] numList = new int[(int) (list.length() / 10.)]; - for (int i = 0; i < (int)(list.length()/10.); i++) { - numList[i] = Integer.parseInt(list.substring(0+10*i, 5+10*i)); + for (int i = 0; i < (int) (list.length() / 10.); i++) { + numList[i] = Integer.parseInt(list.substring(0 + 10 * i, 5 + 10 * i)); //log.debug(CMainControl.getInstance().getArchObjectStack().getArch(numList[i]).getArchName()); } @@ -197,12 +207,12 @@ * note that the same indices are used for same arches in 'getListNodeNrArray()' */ public String[] getListCathegoryArray() { - String[] cathList = new String[(int)(list.length()/10.)]; + String[] cathList = new String[(int) (list.length() / 10.)]; int index; - for (int i = 0; i < (int)(list.length()/10.); i++) { + for (int i = 0; i < (int) (list.length() / 10.); i++) { try { - index = Integer.parseInt(list.substring(5+10*i, 10+10*i)); + index = Integer.parseInt(list.substring(5 + 10 * i, 10 + 10 * i)); cathList[i] = jbox.getItemAt(index).toString().trim(); } catch (NullPointerException e) { log.warn("Nullpointer in getListCathegoryArray()!", e); @@ -226,10 +236,10 @@ if (index >= 0) { if (index == 0) { // this.model.addElement(this.list.substring(offset, offset+5)+" I:"+this.list.substring(offset+5, offset+10)); - this.model.addElement(this.list.substring(offset, offset+5)); + this.model.addElement(this.list.substring(offset, offset + 5)); } else { - if (index == Integer.parseInt(this.list.substring(offset+5, offset+10))) { - this.model.addElement(this.list.substring(offset, offset+5)); + if (index == Integer.parseInt(this.list.substring(offset + 5, offset + 10))) { + this.model.addElement(this.list.substring(offset, offset + 5)); } } } @@ -261,7 +271,7 @@ ArchObject arch = m_control.getArchObjectStack().getArch(Integer.parseInt(value.toString())); if (iss) { m_panel.setPanelArch(Integer.parseInt(value.toString())); - m_control.setStatusText(" "+value.toString()+" "); + m_control.setStatusText(" " + value.toString() + " "); } m_control.setPlainFont(this); setText(arch.getArchName()); Modified: trunk/crossfire/src/cfeditor/CArchQuickView.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-05-26 10:23:05 UTC (rev 26) +++ trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-05-26 10:55:45 UTC (rev 27) @@ -36,15 +36,19 @@ /** * The <code>CArchQuickView</code> holds the tile palette. - * * @author <a href="mailto:mic...@no...">Michael Toennies</a> */ public class CArchQuickView extends JPanel { + /** Controller of this subview. */ private final CMainControl m_control; + private final JLabel archArchNameText = new JLabel(); + private final JLabel archObjNameText = new JLabel(); + private final JLabel archTypeText = new JLabel(); + private final JLabel archTileText = new JLabel(); private static final long serialVersionUID = -5176382751320643475L; @@ -115,33 +119,33 @@ return; } - archArchNameText.setText("<html><font color=black>Arch: "+arch.getArchName()+"</font></html>"); + archArchNameText.setText("<html><font color=black>Arch: " + arch.getArchName() + "</font></html>"); if (arch.getObjName() == null || arch.getObjName().length() <= 0) { ArchObject def = arch.getDefaultArch(); if (def == null || def == arch) { archObjNameText.setText("<html><font color=black>Name: -none- </font></html>"); } else if (def.getObjName() != null && def.getObjName().length() > 0) { - archObjNameText.setText("<html><font color=black>Name: "+def.getObjName()+"</font></html>"); + archObjNameText.setText("<html><font color=black>Name: " + def.getObjName() + "</font></html>"); } else if (def.getArchName() != null && def.getArchName().length() > 0) { - archObjNameText.setText("<html><font color=black>Name: "+def.getArchName()+"</font></html>"); + archObjNameText.setText("<html><font color=black>Name: " + def.getArchName() + "</font></html>"); } else { archObjNameText.setText("<html><font color=black>Name: -none- </font></html>"); } } else { - archObjNameText.setText("<html><font color=black>Name: "+arch.getObjName()+"</font></html>"); + archObjNameText.setText("<html><font color=black>Name: " + arch.getObjName() + "</font></html>"); } - archTypeText.setText("<html><font color=black>Type: "+ - m_control.getArchObjectParser().getArchTypeName(arch.getArchTypNr()) - +" ("+arch.getArchTypNr()+") </font></html>"); + archTypeText.setText("<html><font color=black>Type: " + + m_control.getArchObjectParser().getArchTypeName(arch.getArchTypNr()) + + " (" + arch.getArchTypNr() + ") </font></html>"); if (arch.getRefCount() > 0) { - archTileText.setText("<html><font color=black>Tile: </font><font color=green> multi</font><font color=black> ("+ - +(arch.getRefCount()+1)+" parts) ("+(arch.getRefMaxX()-arch.getRefMaxMX()+1)+","+(arch.getRefMaxY()-arch.getRefMaxMY()+1) - +")</font></html>"); + archTileText.setText("<html><font color=black>Tile: </font><font color=green> multi</font><font color=black> (" + + +(arch.getRefCount() + 1) + " parts) (" + (arch.getRefMaxX() - arch.getRefMaxMX() + 1) + "," + (arch.getRefMaxY() - arch.getRefMaxMY() + 1) + + ")</font></html>"); } else { archTileText.setText("<html><font color=black>Tile: single" - +"</font></html>"); + + "</font></html>"); } // notify ReplaceDialog Modified: trunk/crossfire/src/cfeditor/CAttribBitmask.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribBitmask.java 2006-05-26 10:23:05 UTC (rev 26) +++ trunk/crossfire/src/cfeditor/CAttribBitmask.java 2006-05-26 10:55:45 UTC (rev 27) @@ -47,11 +47,12 @@ * arch attributes. Attacktype, spellpath and material are such * bitmasks. They are disguised for the user, with the help of * the attribute dialog. - * * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ public class CAttribBitmask { + private static final Logger log = Logger.getLogger(CAttribBitmask.class); + // maximum number of characters in a line before linebreak (see getText()) //private static final int MAX_CHARS_PER_LINE = 50; private static final int MAX_CHARS_PER_LINE = 35; @@ -59,15 +60,16 @@ private final String[] bit_name; // array of the names of bitmask-entries private final int maxvalue; // max. possible value + private final int number; // number of bitmask entrys (not counting zero) /** * Konstructor of a bitmask (DEPRECATED!) - * @param name array of names for the bit-entries + * @param name array of names for the bit-entries */ public CAttribBitmask(String[] name) { // initialize arrays - bit_name = new String[name.length+1]; + bit_name = new String[name.length + 1]; //bit_value = new int[name.length+1]; // the zero-bit is always <none> @@ -76,17 +78,17 @@ for (int i = 0; i < name.length; i++) { // fill array and assign 2^i values - bit_name[i+1] = name[i]; + bit_name[i + 1] = name[i]; //bit_value[i+1] = (int)(Math.pow(2., (double)(i-1))); } - number = bit_name.length-1; - maxvalue = ((int)Math.pow(2., (double)(bit_name.length+1)))-1; + number = bit_name.length - 1; + maxvalue = ((int) Math.pow(2., (double) (bit_name.length + 1))) - 1; } /** * Konstructor of a bitmask from XML element - * @param root xml bitmask element + * @param root xml bitmask element */ public CAttribBitmask(Element root) { int i; @@ -99,7 +101,7 @@ // find highest bit number int max_bit = 0; for (i = 0; entries != null && i < entries.size(); i++) { - elem = (Element)entries.get(i); + elem = (Element) entries.get(i); if ((a = elem.getAttribute("bit")) == null || elem.getAttribute("name") == null) { log.warn("Parse error: Found bitmask entry without 'bit' or 'name'."); elem.detach(); // remove element from DOM tree @@ -110,7 +112,7 @@ max_bit = bit; // this is the highest bit so far } } catch (DataConversionException e) { - log.warn("Parse error: Bitmask bit '"+a.getValue()+"' ("+elem.getAttribute("name").getValue()+") is not an integer."); + log.warn("Parse error: Bitmask bit '" + a.getValue() + "' (" + elem.getAttribute("name").getValue() + ") is not an integer."); elem.detach(); // remove element from DOM tree } } @@ -118,34 +120,35 @@ entries = root.getChildren("entry"); // retake list, in case we detached some elements // initialize array - bit_name = new String[max_bit+2]; + bit_name = new String[max_bit + 2]; // initialize names array - the zero-bit always stays <none> - for (i = 0; i < max_bit+2; i++) { + for (i = 0; i < max_bit + 2; i++) { bit_name[i] = "<none>"; } for (i = 0; entries != null && i < entries.size(); i++) { - elem = (Element)entries.get(i); + elem = (Element) entries.get(i); // fill array and assign 2^i values try { - bit_name[elem.getAttribute("bit").getIntValue()+1] = elem.getAttribute("name").getValue(); - } catch (DataConversionException e) {} + bit_name[elem.getAttribute("bit").getIntValue() + 1] = elem.getAttribute("name").getValue(); + } catch (DataConversionException e) { + } } if (log.isDebugEnabled()) { - String s = "bitmask '"+root.getAttribute("name")+"':"; + String s = "bitmask '" + root.getAttribute("name") + "':"; for (i = 0; i < bit_name.length; i++) { - s = s+" "+i+" = "+bit_name[i]; + s = s + " " + i + " = " + bit_name[i]; } log.debug(s); } - number = bit_name.length-1; - maxvalue = ((int)Math.pow(2., (double)(bit_name.length+1)))-1; + number = bit_name.length - 1; + maxvalue = ((int) Math.pow(2., (double) (bit_name.length + 1))) - 1; } else { // Error: this is an "empty" bitmask - log.warn("Error in \""+IGUIConstants.TYPEDEF_FILE+"\": Found a bitmask without content!"); + log.warn("Error in \"" + IGUIConstants.TYPEDEF_FILE + "\": Found a bitmask without content!"); bit_name = new String[1]; bit_name[0] = "<none>"; number = 0; @@ -155,21 +158,20 @@ /** * check wether the given bit-index is an active bit in the bitmask - * @param index index of the bit to check (range from 1-'number') - * @param mask bitmask to check against + * @param index index of the bit to check (range from 1-'number') + * @param mask bitmask to check against * @return true if the bit-index is an active bit */ private boolean is_active(int index, int mask) { - return ((int)(Math.pow(2., (double)(index-1)))&mask) != 0; + return ((int) (Math.pow(2., (double) (index - 1))) & mask) != 0; } /** * Display the appropriate text for a given bitmask value. * The text is put into a non-editable textarea. - * - * @param value bitmask value - * @param textf if non-null, this textarea is used for drawing, - * if null, a new textarea is created and returned + * @param value bitmask value + * @param textf if non-null, this textarea is used for drawing, + * if null, a new textarea is created and returned * @return <code>JTextArea</code> with all entries belonging to the bitmask * and proper dimensions */ @@ -185,7 +187,7 @@ } else { // value too big? if (value > maxvalue) { - log.warn("bitmask value "+value+" is too big."); + log.warn("bitmask value " + value + " is too big."); } boolean linebreak = false; @@ -195,7 +197,7 @@ if (is_active(i, value)) { // is a linebreak required? linelength = text.indexOf("\n") >= 0 ? text.substring(text.lastIndexOf("\n")).length() : text.length(); - if (linelength+bit_name[i].length()+2 > MAX_CHARS_PER_LINE) { + if (linelength + bit_name[i].length() + 2 > MAX_CHARS_PER_LINE) { text += ", \n "; linebreak = true; rows++; @@ -204,7 +206,7 @@ } // append text - text += ((text.length() <= 1 || linebreak) ? "" : ", ")+bit_name[i]; + text += ((text.length() <= 1 || linebreak) ? "" : ", ") + bit_name[i]; linelength = text.indexOf("\n") >= 0 ? text.substring(text.lastIndexOf("\n")).length() : text.length(); if (linelength > columns) { @@ -216,7 +218,7 @@ // create JTextArea (setting columns results in textarea being too wide) if (textf == null) { - textf = new JTextArea(text+" ", rows, 18); + textf = new JTextArea(text + " ", rows, 18); // set colors, border and stuff textf.setForeground(Color.black); @@ -225,7 +227,7 @@ textf.setBorder(BorderFactory.createLineBorder(Color.gray)); } else { // textarea already exists, so change it - textf.setText(text+" "); + textf.setText(text + " "); textf.setRows(rows); textf.setColumns(18); } @@ -233,11 +235,9 @@ return textf; } - /** - * Open a popup frame to select bitmask-entries via chooseboxes. - */ + /** Open a popup frame to select bitmask-entries via chooseboxes. */ public void popup_frame(CAttribDialog attrDialog, CAttribDialog.BitmaskAttrib gui_attr) { - String title = "Choose "+gui_attr.ref.getNameNew().substring(0, 1).toUpperCase()+gui_attr.ref.getNameNew().substring(1); + String title = "Choose " + gui_attr.ref.getNameNew().substring(0, 1).toUpperCase() + gui_attr.ref.getNameNew().substring(1); JDialog frame = new JDialog(attrDialog, title, true); frame.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); @@ -245,7 +245,7 @@ JPanel main_panel = new JPanel(); main_panel.setLayout(new BoxLayout(main_panel, BoxLayout.Y_AXIS)); JPanel grid_panel = new JPanel(new GridLayout(1, 2)); - JPanel left_list = new JPanel(); // left column of checkboxes + JPanel left_list = new JPanel(); // left column of checkboxes left_list.setLayout(new BoxLayout(left_list, BoxLayout.Y_AXIS)); JPanel right_list = new JPanel(); // right column of checkboxes right_list.setLayout(new BoxLayout(right_list, BoxLayout.Y_AXIS)); @@ -254,9 +254,9 @@ // create checkboxes JCheckBox[] checkbox = new JCheckBox[number]; for (int i = 0; i < number; i++) { - checkbox[i] = new JCheckBox(" "+bit_name[i+1]); - checkbox[i].setSelected(is_active(i+1, gui_attr.getValue())); - if (i%2 == 0) { + checkbox[i] = new JCheckBox(" " + bit_name[i + 1]); + checkbox[i].setSelected(is_active(i + 1, gui_attr.getValue())); + if (i % 2 == 0) { left_list.add(checkbox[i]); } else { right_list.add(checkbox[i]); @@ -291,19 +291,24 @@ * where changes to the bitmask can be selected. */ private class PopupFrameAL implements ActionListener { + CAttribBitmask bitmask; // reference to this CAttribBitmask instance + JDialog frame; // reference to the popup dialog frame + CAttribDialog.BitmaskAttrib gui_attr; // gui attribute instance + JCheckBox[] checkbox; // array of checkboxes on the frame + CAttribDialog attrDialog; // instance of attribute dialog (parent frame) /** * Contructor - * @param new_frame thepopup dialog frame - * @param new_gui_attr gui attribute instance - * @param new_mask this CAttribBitmask instance - * @param boxarray array of checkboxes in the popup frame - * @param new_attrD attribute dialog frame + * @param new_frame thepopup dialog frame + * @param new_gui_attr gui attribute instance + * @param new_mask this CAttribBitmask instance + * @param boxarray array of checkboxes in the popup frame + * @param new_attrD attribute dialog frame */ public PopupFrameAL(JDialog new_frame, CAttribDialog.BitmaskAttrib new_gui_attr, CAttribBitmask new_mask, JCheckBox[] boxarray, CAttribDialog new_attrD) { @@ -316,17 +321,17 @@ /** * a button was pressed - * @param event the occured <code>ActionEvent</code> (button pressed) + * @param event the occured <code>ActionEvent</code> (button pressed) */ public void actionPerformed(ActionEvent event) { if (event.getSource() instanceof JButton) { // check if the okay button was pressed - if (((JButton)event.getSource()).getText().equalsIgnoreCase("Ok")) { + if (((JButton) event.getSource()).getText().equalsIgnoreCase("Ok")) { // calculate the new bitmask value: int new_value = 0; for (int i = 0; i < bitmask.number; i++) { if (checkbox[i].isSelected()) { - new_value |= (int)(Math.pow(2., (double)i)); + new_value |= (int) (Math.pow(2., (double) i)); } } Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 10:23:05 UTC (rev 26) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 10:55:45 UTC (rev 27) @@ -68,20 +68,25 @@ /** * CAttribDialog poses the GUI... [truncated message content] |
From: <der...@us...> - 2006-05-26 10:23:19
|
Revision: 26 Author: derdanny Date: 2006-05-26 03:23:05 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=26&view=rev Log Message: ----------- Changed CVS to SVN on website. Modified Paths: -------------- trunk/src/doc/start.xhtml Modified: trunk/src/doc/start.xhtml =================================================================== --- trunk/src/doc/start.xhtml 2006-05-26 10:02:57 UTC (rev 25) +++ trunk/src/doc/start.xhtml 2006-05-26 10:23:05 UTC (rev 26) @@ -48,7 +48,7 @@ </ul> <h2>Links</h2> <ul> - <li><a href="http://sourceforge.net/projects/gridarta/">Gridarta SourceForge Project Page</a> (Forum, Bug Tracker, Feature Request Tracker, Web access to the CVS repository and more)</li> + <li><a href="http://sourceforge.net/projects/gridarta/">Gridarta SourceForge Project Page</a> (Forum, Bug Tracker, Feature Request Tracker, Web access to the SVN repository and more)</li> <li><a href="http://freshmeat.net/projects/gridarta/">Gridarta FreshMeat Project Page</a></li> </ul> </body> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-26 10:03:13
|
Revision: 25 Author: christianhujer Date: 2006-05-26 03:02:57 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=25&view=rev Log Message: ----------- Fixed bug: After the refactoring, sorting didn't work any longer. Modified Paths: -------------- trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java Modified: trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java 2006-05-26 01:05:12 UTC (rev 24) +++ trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java 2006-05-26 10:02:57 UTC (rev 25) @@ -27,13 +27,15 @@ /** * A single animation object. + * An animation object holds the name and the framelist of an animation. */ -public final class AnimationObject { +public final class AnimationObject implements Comparable<AnimationObject> { /** The name of this animation. */ private final String animName; - /** The animation list of this animation. + /** + * The animation list of this animation. * The individual entries are all postfixed with '\n'. */ private final String animList; @@ -79,4 +81,9 @@ return sb.toString(); } + /** {@inheritDoc} */ + public int compareTo(final AnimationObject o) { + return animName.compareTo(o.animName); + } + } // class AnimationObject This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-26 01:05:47
|
Revision: 24 Author: christianhujer Date: 2006-05-25 18:05:12 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=24&view=rev Log Message: ----------- Optimized imports. Modified Paths: -------------- trunk/crossfire/src/cfeditor/AutojoinList.java trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CArchPanelPan.java trunk/crossfire/src/cfeditor/CArchQuickView.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainMenu.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CMapControl.java trunk/crossfire/src/cfeditor/CMapFileDecode.java trunk/crossfire/src/cfeditor/CMapFileEncode.java trunk/crossfire/src/cfeditor/CMapModel.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/CMapViewIFrame.java trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/ExitTypes.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/crossfire/src/cfeditor/arch/ArchObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectIterator.java trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteArchMapObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteMapArch.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java trunk/crossfire/src/cfeditor/gui/ArchComboBox.java trunk/crossfire/src/cfeditor/parameter/ArchParameter.java Modified: trunk/crossfire/src/cfeditor/AutojoinList.java =================================================================== --- trunk/crossfire/src/cfeditor/AutojoinList.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/AutojoinList.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,12 +24,12 @@ package cfeditor; +import cfeditor.arch.ArchObject; +import cfeditor.arch.ArchObjectStack; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import org.apache.log4j.Logger; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; /** * The <code>AutojoinList</code> class contains a list of (typically wall-)arches which Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; @@ -34,7 +35,6 @@ import javax.swing.JTabbedPane; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import cfeditor.arch.ArchObject; /** * The <code>CArchPanel</code> holds the tile palette. Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.ActionEvent; @@ -40,7 +41,6 @@ import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import org.apache.log4j.Logger; -import cfeditor.arch.ArchObject; public class CArchPanelPan extends JPanel { private static final Logger log = Logger.getLogger(CArchPanel.class); Modified: trunk/crossfire/src/cfeditor/CArchQuickView.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CArchQuickView.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.GridBagConstraints; @@ -32,7 +33,6 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; -import cfeditor.arch.ArchObject; /** * The <code>CArchQuickView</code> holds the tile palette. Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -64,7 +65,6 @@ import javax.swing.text.StyleConstants; import javax.swing.text.StyleContext; import org.apache.log4j.Logger; -import cfeditor.arch.ArchObject; /** * CAttribDialog poses the GUI for CF object attributes Modified: trunk/crossfire/src/cfeditor/CFArchTypeList.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.EOFException; @@ -44,7 +45,6 @@ import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; -import cfeditor.arch.ArchObject; /** * This class handles all the CFArchTypes and makes Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,8 @@ package cfeditor; +import cfeditor.arch.ArchObject; +import cfeditor.arch.ArchObjectStack; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -51,8 +53,6 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.TreePath; import org.apache.log4j.Logger; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; /** * The CFTreasureListTree class fully manages the Crossfire treausrelists. Modified: trunk/crossfire/src/cfeditor/CFilterControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CFilterControl.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CFilterControl.java 2006-05-26 01:05:12 UTC (rev 24) @@ -6,6 +6,7 @@ */ package cfeditor; +import cfeditor.arch.ArchObject; import cfeditor.filter.ConfigEvent; import cfeditor.filter.ConfigListener; import cfeditor.filter.Filter; @@ -14,7 +15,6 @@ import cfeditor.filter.NamedFilterList; import cfeditor.filter.NamedFilterListener; import cfeditor.menu.BasicMenuEntry; -import cfeditor.arch.ArchObject; import javax.swing.JComponent; import javax.swing.JMenu; Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,11 +24,11 @@ package cfeditor; -import cfeditor.textedit.scripteditor.ScriptEditControl; -import cfeditor.arch.anim.AnimationObjects; import cfeditor.arch.ArchObject; import cfeditor.arch.ArchObjectParser; import cfeditor.arch.ArchObjectStack; +import cfeditor.arch.anim.AnimationObjects; +import cfeditor.textedit.scripteditor.ScriptEditControl; import java.awt.Font; import java.awt.Point; import java.awt.Rectangle; Modified: trunk/crossfire/src/cfeditor/CMainMenu.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainMenu.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMainMenu.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObjectStack; import cfeditor.menu.AggregateMenuLocation; import cfeditor.menu.BasicMenuEntry; import cfeditor.menu.CheckBoxMenuEntry; @@ -33,7 +34,6 @@ import cfeditor.menu.SimpleMenuEntry; import cfeditor.menu.SimpleMenuLocation; import cfeditor.textedit.scripteditor.ScriptEditControl; -import cfeditor.arch.ArchObjectStack; import java.awt.Event; import java.awt.Font; import java.awt.event.ActionEvent; Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; @@ -44,7 +45,6 @@ import javax.swing.UIManager; import javax.swing.event.InternalFrameEvent; import javax.swing.event.InternalFrameListener; -import cfeditor.arch.ArchObject; /** * The main view of the level editor. Contains the "desktop" for internal level Modified: trunk/crossfire/src/cfeditor/CMapArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMapArchPanel.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -54,7 +55,6 @@ import javax.swing.text.Style; import javax.swing.text.StyleConstants; import javax.swing.text.StyleContext; -import cfeditor.arch.ArchObject; /** * <code>CMapArchPanel</code> implements the panel that holds information about Modified: trunk/crossfire/src/cfeditor/CMapControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapControl.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMapControl.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,12 +24,12 @@ package cfeditor; +import cfeditor.arch.ArchObject; +import cfeditor.arch.ArchObjectIterator; +import cfeditor.arch.ArchObjectIteratorDeleteMapArch; import java.awt.Point; import java.io.File; import java.util.Iterator; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectIterator; -import cfeditor.arch.ArchObjectIteratorDeleteMapArch; /** * The <code>CMapControl</code> Modified: trunk/crossfire/src/cfeditor/CMapFileDecode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMapFileDecode.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,12 +24,12 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import org.apache.log4j.Logger; -import cfeditor.arch.ArchObject; /** * This class handles the reading of a mapfile and parsing the data Modified: trunk/crossfire/src/cfeditor/CMapFileEncode.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMapFileEncode.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; @@ -36,7 +37,6 @@ import java.util.HashMap; import java.util.Iterator; import org.apache.log4j.Logger; -import cfeditor.arch.ArchObject; /** * The <code>CMapFileEncode</code> Modified: trunk/crossfire/src/cfeditor/CMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapModel.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMapModel.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,14 +24,14 @@ package cfeditor; +import cfeditor.arch.ArchObject; +import cfeditor.arch.ArchObjectIterator; +import cfeditor.arch.ArchObjectIteratorDeleteArchMapObject; +import cfeditor.arch.ArchObjectIteratorDeleteMapArch; import cfeditor.filter.Filter; import cfeditor.filter.FilterConfig; import cfeditor.filter.NamedFilterConfig; import cfeditor.filter.NamedFilterList; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectIterator; -import cfeditor.arch.ArchObjectIteratorDeleteArchMapObject; -import cfeditor.arch.ArchObjectIteratorDeleteMapArch; import java.awt.Point; import java.util.Iterator; import org.apache.log4j.Logger; Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -47,7 +48,6 @@ import static javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import cfeditor.arch.ArchObject; /** * The panel that holds the map-tiles of the selected map square. (The window Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,9 +24,9 @@ package cfeditor; -import cfeditor.filter.AttributeFilter; import cfeditor.arch.ArchObject; import cfeditor.arch.ArchObjectStack; +import cfeditor.filter.AttributeFilter; import com.visualtek.png.PNGEncoder; import com.visualtek.png.PNGException; import java.awt.Color; Modified: trunk/crossfire/src/cfeditor/CMapViewIFrame.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewIFrame.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CMapViewIFrame.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,9 +24,9 @@ package cfeditor; +import cfeditor.arch.ArchObject; import cfeditor.menu.MenuHelper; import cfeditor.menu.MenuManager; -import cfeditor.arch.ArchObject; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Point; Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObjectStack; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.FlowLayout; @@ -43,7 +44,6 @@ import javax.swing.border.EmptyBorder; import javax.swing.border.EtchedBorder; import javax.swing.border.TitledBorder; -import cfeditor.arch.ArchObjectStack; /** * Dialog used to ask the user the properties for the new level. Contains a Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.io.File; import java.util.Enumeration; import java.util.Hashtable; @@ -32,7 +33,6 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.apache.log4j.Logger; -import cfeditor.arch.ArchObject; /** * The <code>CPickmapPanel</code> manages the pickmap panel Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,10 +24,10 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.Point; import java.util.Iterator; import org.apache.log4j.Logger; -import cfeditor.arch.ArchObject; /** * This class manages the cut/copy/paste actions in maps. The data is Modified: trunk/crossfire/src/cfeditor/ExitTypes.java =================================================================== --- trunk/crossfire/src/cfeditor/ExitTypes.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/ExitTypes.java 2006-05-26 01:05:12 UTC (rev 24) @@ -2,9 +2,9 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.util.HashSet; import java.util.Set; -import cfeditor.arch.ArchObject; /** Contains a list of all types that are exits. * @author Andreas Kirschbaum Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,7 @@ package cfeditor; +import cfeditor.arch.ArchObject; import java.awt.Color; import java.awt.FlowLayout; import java.awt.Point; @@ -43,7 +44,6 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; -import cfeditor.arch.ArchObject; /** * This dialog manages the replace action Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,8 +24,8 @@ package cfeditor; +import cfeditor.arch.ArchObject; import cfeditor.textedit.scripteditor.ScriptEditControl; -import cfeditor.arch.ArchObject; import java.awt.Color; import java.awt.FlowLayout; import java.awt.Insets; Modified: trunk/crossfire/src/cfeditor/arch/ArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/arch/ArchObject.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,13 @@ package cfeditor.arch; +import cfeditor.AutojoinList; +import cfeditor.CFArchType; +import cfeditor.CFArchTypeList; +import cfeditor.CMapArchPanel; +import cfeditor.IGUIConstants; +import cfeditor.MultiArchData; +import cfeditor.ScriptArchData; import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; @@ -35,13 +42,6 @@ import java.util.ListIterator; import javax.swing.JList; import org.apache.log4j.Logger; -import cfeditor.CFArchTypeList; -import cfeditor.MultiArchData; -import cfeditor.ScriptArchData; -import cfeditor.AutojoinList; -import cfeditor.IGUIConstants; -import cfeditor.CMapArchPanel; -import cfeditor.CFArchType; /** * The <code>ArchObject</code> class handles the Crossfire arch objects. Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectIterator.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectIterator.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectIterator.java 2006-05-26 01:05:12 UTC (rev 24) @@ -4,7 +4,6 @@ import java.util.Iterator; import java.util.NoSuchElementException; -import cfeditor.arch.ArchObject; /** * The class ArchObjectIterator implements an {@link java.util.Iterator} that Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteArchMapObject.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteArchMapObject.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteArchMapObject.java 2006-05-26 01:05:12 UTC (rev 24) @@ -2,10 +2,8 @@ package cfeditor.arch; -import java.util.Iterator; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectIterator; import cfeditor.CMapModel; +import java.util.Iterator; /** * The class ArchObjectIterator implements an {@link cfeditor.arch.ArchObjectIterator} that Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteMapArch.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteMapArch.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteMapArch.java 2006-05-26 01:05:12 UTC (rev 24) @@ -2,10 +2,8 @@ package cfeditor.arch; -import java.util.Iterator; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectIterator; import cfeditor.CMapModel; +import java.util.Iterator; /** * The class ArchObjectIterator implements an {@link ArchObjectIterator} that Modified: trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java 2006-05-26 01:05:12 UTC (rev 24) @@ -24,6 +24,10 @@ package cfeditor.arch; +import cfeditor.CFileReader; +import cfeditor.CMainControl; +import cfeditor.IGUIConstants; +import cfeditor.MultiPositionData; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; @@ -38,11 +42,6 @@ import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; -import cfeditor.arch.ArchObject; -import cfeditor.CMainControl; -import cfeditor.CFileReader; -import cfeditor.IGUIConstants; -import cfeditor.MultiPositionData; /** * The <code>ArchObjectParser</code> class handles the parsing of arches. Modified: trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java =================================================================== --- trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java 2006-05-26 01:05:12 UTC (rev 24) @@ -29,7 +29,6 @@ import java.util.Iterator; import java.util.List; import java.util.TreeSet; -import cfeditor.arch.anim.AnimationObject; /** * The <code>AnimationObject</code>. Modified: trunk/crossfire/src/cfeditor/gui/ArchComboBox.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/ArchComboBox.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/gui/ArchComboBox.java 2006-05-26 01:05:12 UTC (rev 24) @@ -6,9 +6,9 @@ */ package cfeditor.gui; -import cfeditor.arch.ArchObject; import cfeditor.CMainControl; import cfeditor.IGUIConstants; +import cfeditor.arch.ArchObject; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; Modified: trunk/crossfire/src/cfeditor/parameter/ArchParameter.java =================================================================== --- trunk/crossfire/src/cfeditor/parameter/ArchParameter.java 2006-05-26 01:03:48 UTC (rev 23) +++ trunk/crossfire/src/cfeditor/parameter/ArchParameter.java 2006-05-26 01:05:12 UTC (rev 24) @@ -6,11 +6,11 @@ */ package cfeditor.parameter; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; import cfeditor.CMainControl; import cfeditor.PluginParameter; import cfeditor.PluginParameterView; +import cfeditor.arch.ArchObject; +import cfeditor.arch.ArchObjectStack; import org.jdom.Element; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-26 01:03:54
|
Revision: 23 Author: christianhujer Date: 2006-05-25 18:03:48 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=23&view=rev Log Message: ----------- Optimized imports. Modified Paths: -------------- trunk/daimonin/src/daieditor/arch/anim/AnimationObjects.java Modified: trunk/daimonin/src/daieditor/arch/anim/AnimationObjects.java =================================================================== --- trunk/daimonin/src/daieditor/arch/anim/AnimationObjects.java 2006-05-26 00:35:12 UTC (rev 22) +++ trunk/daimonin/src/daieditor/arch/anim/AnimationObjects.java 2006-05-26 01:03:48 UTC (rev 23) @@ -27,8 +27,6 @@ import static daieditor.CMainControl.MAP_ENCODING; import daieditor.arch.NamedObjects; -import daieditor.arch.anim.AnimationParseException; -import daieditor.arch.anim.DuplicateAnimationException; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; @@ -38,7 +36,6 @@ import java.io.Reader; import java.util.HashMap; import java.util.Map; -import daieditor.arch.anim.AnimationObject; /** The <code>AnimationObject</code>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-26 00:36:28
|
Revision: 22 Author: christianhujer Date: 2006-05-25 17:35:12 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=22&view=rev Log Message: ----------- Moved ArchObject related data classes to a package of their own. Modified Paths: -------------- trunk/crossfire/src/cfeditor/AutojoinList.java trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CArchPanelPan.java trunk/crossfire/src/cfeditor/CArchQuickView.java trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/crossfire/src/cfeditor/CFTreasureListTree.java trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainMenu.java trunk/crossfire/src/cfeditor/CMainStatusbar.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapArchPanel.java trunk/crossfire/src/cfeditor/CMapControl.java trunk/crossfire/src/cfeditor/CMapFileDecode.java trunk/crossfire/src/cfeditor/CMapFileEncode.java trunk/crossfire/src/cfeditor/CMapModel.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/crossfire/src/cfeditor/CMapViewIFrame.java trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/ExitTypes.java trunk/crossfire/src/cfeditor/MultiArchData.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/crossfire/src/cfeditor/filter/AttributeFilter.java trunk/crossfire/src/cfeditor/filter/Filter.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/crossfire/src/cfeditor/gui/ArchComboBox.java trunk/crossfire/src/cfeditor/parameter/ArchParameter.java Added Paths: ----------- trunk/crossfire/src/cfeditor/arch/ArchObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectIterator.java trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteArchMapObject.java trunk/crossfire/src/cfeditor/arch/ArchObjectIteratorDeleteMapArch.java trunk/crossfire/src/cfeditor/arch/ArchObjectParser.java trunk/crossfire/src/cfeditor/arch/ArchObjectStack.java Removed Paths: ------------- trunk/crossfire/src/cfeditor/ArchObject.java trunk/crossfire/src/cfeditor/ArchObjectIterator.java trunk/crossfire/src/cfeditor/ArchObjectIteratorDeleteArchMapObject.java trunk/crossfire/src/cfeditor/ArchObjectIteratorDeleteMapArch.java trunk/crossfire/src/cfeditor/ArchObjectParser.java trunk/crossfire/src/cfeditor/ArchObjectStack.java Deleted: trunk/crossfire/src/cfeditor/ArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/ArchObject.java 2006-05-26 00:09:33 UTC (rev 21) +++ trunk/crossfire/src/cfeditor/ArchObject.java 2006-05-26 00:35:12 UTC (rev 22) @@ -1,1472 +0,0 @@ -/* - * Crossfire Java Editor. - * Copyright (C) 2000 Michael Toennies - * Copyright (C) 2001 Andreas Vogl - * - * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) - * - * 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 cfeditor; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.StringReader; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.ListIterator; -import javax.swing.JList; -import org.apache.log4j.Logger; - -/** - * The <code>ArchObject</code> class handles the Crossfire arch objects. - * - * @author <a href="mailto:mic...@no...">Michael Toennies</a> - * @author <a href="mailto:and...@gm...">Andreas Vogl</a> - */ -public class ArchObject implements Cloneable { - - private static final Logger log = Logger.getLogger(ArchObject.class); - public static final int TYPE_UNSET = -666; // means the arch has no type set - - private static ArchObjectStack archstack; // static reference to the archstack (-> default arches) - private static CFArchTypeList typelist; // static reference to the typelist (-> find syntax errors) - private static int my_id_counter = 0; - - private int my_id; // the one and only id - // unique arch object id at editor runtime - - private String faceName; // face name : 1 - private String archName; // arch Name - private String objName; - - private StringBuffer archText; // the arch text (contains only the differences from default arch) - // it is a rule that every line ends with a '\n', including the last line - private StringBuffer msgText; // msg text buffer - private StringBuffer animText; // anim text buffer - private StringBuffer loreText; // lore text buffer - private int archTextCount; // lines inserted in ArchText - - private int nodenr; // we are (internal) arch nr in node list - // the nodenr determines the (default) archetype - - private int mapx; // if on map, we are here - private int mapy; - - private MultiArchData multi; // data for multi-arches - null for single-square arches - - private ScriptArchData script; // data for scripted events - null if no events defined - - private boolean noface; // if true, arch has no face as default - private int facenr; // the index of faceImages[] - - private boolean editflag; // if true, object is in a editor - // for example in the map arch panel - private boolean artifacts_flag; // if set, this is not a "real" arch - // It will NOT be included in the arch collection - - private ArchObject next; // to chain ArchObjects in maps - private ArchObject prev; // same - private ArchObject tempptr; // we need this for chain the arches - - /** - * Enclosing container; if null, this object is not in a container but in a - * map. - */ - private ArchObject _env = null; - - /** - * All inventory objects. Set to {@link java.util.Collections#EMPTY_LIST} - * (to save space) if the object has no inventory. - */ - private List _inv = Collections.EMPTY_LIST; - - private int arch_type; // CF object type of the arch - - private int intern_temp; // used for drawing - private int edit_type; // for view settings - private AutojoinList join; // if nonzero, pointing to the list of autojoining archetypes - - private final HashMap cachedAttribute = new HashMap(); - - /** - * ArchObject constructor - */ - public ArchObject() { - multi = null; // this object stays 'null' for all single-tile arches - script = null; // this object stays 'null' unless there are events defined - - my_id = my_id_counter++; // increase ID counter for every new arch created - - archName = null; - archText = new StringBuffer(""); - msgText = animText = loreText = null; - archTextCount = 0; // lines inserted in archText - - objName = null; - intern_temp = 0; - - noface = true; // this sucker has no face - artifacts_flag = false; // will be true for arches from the artifacts file - faceName = null; // if there is a face cmd, this is the face name - facenr = -1; // if we have a face AND we have loaded the face, this is his number. - // if faceName != null and facenr == -1, we haven't loaded the face - // if faceName == null and facenr != -1, we got the face from default arch! - - editflag = false; - join = null; // no autojoin list per default - arch_type = ArchObject.TYPE_UNSET; // type must be set - nodenr = -1; // as default we are not in a node list - next = null; - prev = null; - tempptr = null; - mapx = 0; - mapy = 0; - edit_type = 0; - } - - // set static references: arch stack and typelist - public static void setArchStack(ArchObjectStack stack) { archstack = stack; } - public static void setTypeList(CFArchTypeList tlist) { typelist = tlist; } - - // edit type is the editable value from arch - // here it is used to identify the layer type - public int getEditType() { - return edit_type; - } - - /** - * @return the default <code>ArchObject</code> for this arch - */ - public ArchObject getDefaultArch() { - return archstack.getArch(nodenr); - } - - /** - * @return true when this ArchObject is a default arch from the stack - */ - public boolean isDefaultArch() { - return archstack.getArch(nodenr) == this; - } - - /** - * Get the EditType of an ArchObject (e.g. floor, monster, etc). - * These are determined by the various attributes of the arch - * (->archText). - * - * @param check_type bitmask containing the edit type(s) to be calculated - * @return new edit_type for this arch - */ - public int calculateEditType(int check_type) { - int no_pick, no_pass; // some attributes - ArchObject defarch = getDefaultArch(); // default arch - - /* if one of the types in check_type already is in edit_type, - // we exclude that one - if ((check_type&edit_type) != 0) { - check_type -= (check_type&edit_type); - } - */ - - // bail out if nothing to do - if (check_type == 0) { - return edit_type; - } - - if (edit_type == IGUIConstants.TILE_EDIT_NONE) { - edit_type = 0; - } else if (edit_type != 0) { - // all flags from 'check_type' must be unset in this arch because they get recalculated now - edit_type &= ~check_type; - } - - if ((check_type&IGUIConstants.TILE_EDIT_BACKGROUND) != 0 && - getAttributeValue("is_floor", defarch) == 1 && - getAttributeValue("no_pick", defarch) == 1) { - // Backgroud: floors - edit_type |= IGUIConstants.TILE_EDIT_BACKGROUND; - } - if ((check_type&IGUIConstants.TILE_EDIT_MONSTER) != 0 && - getAttributeValue("alive", defarch) == 1 && - (getAttributeValue("monster", defarch) == 1 || - getAttributeValue("generator", defarch) == 1)) { - // Monster: monsters/npcs/generators - edit_type |= IGUIConstants.TILE_EDIT_MONSTER; - } - if ((check_type&IGUIConstants.TILE_EDIT_WALL) != 0 && - arch_type == 0 && getAttributeValue("no_pass", defarch) == 1) { - // Walls - edit_type |= IGUIConstants.TILE_EDIT_WALL; - } - if ((check_type&IGUIConstants.TILE_EDIT_CONNECTED) != 0 && - getAttributeValue("connected", defarch) != 0) { - // Connected Objects - edit_type |= IGUIConstants.TILE_EDIT_CONNECTED; - } - if ((check_type&IGUIConstants.TILE_EDIT_EXIT) != 0 && - arch_type == 66 || arch_type == 41 || arch_type == 95) { - // Exit: teleporter/exit/trapdoors - edit_type |= IGUIConstants.TILE_EDIT_EXIT; - } - if ((check_type&IGUIConstants.TILE_EDIT_TREASURE) != 0 && - getAttributeValue("no_pick", defarch) == 0 && (arch_type == 4 || - arch_type == 5 || arch_type == 36 || arch_type == 60 || - arch_type == 85 || arch_type == 111 || arch_type == 123 || - arch_type == 124 || arch_type == 130)) { - // Treasure: randomtreasure/money/gems/potions/spellbooks/scrolls - edit_type |= IGUIConstants.TILE_EDIT_TREASURE; - } - if ((check_type&IGUIConstants.TILE_EDIT_DOOR) != 0 && - arch_type == 20 || arch_type == 23 || arch_type == 26 || - arch_type == 91 || arch_type == 21 || arch_type == 24) { - // Door: door/special door/gates + keys - edit_type |= IGUIConstants.TILE_EDIT_DOOR; - } - if ((check_type&IGUIConstants.TILE_EDIT_EQUIP) != 0 && - getAttributeValue("no_pick", defarch) == 0 && ((arch_type >= 13 && - arch_type <= 16) || arch_type == 33 || arch_type == 34 || - arch_type == 35 || arch_type == 39 || arch_type == 70 || - arch_type == 87 || arch_type == 99 || arch_type == 100 || - arch_type == 104 || arch_type == 109 || arch_type == 113 || - arch_type == 122 || arch_type == 3)) { - // Equipment: weapons/armour/wands/rods - edit_type |= IGUIConstants.TILE_EDIT_EQUIP; - } - - return edit_type; - } - - /** - * Get the value of an arch attribute from the archText - * both of the arch itself and if n.e. in it's default arch. - * If the attribute doesn't exist in either one, or the value is - * not a number, zero is returned. - * - * @param attr search for "attr <value>" - * @param defarch default arch of 'this' arch - * defarch=null means this *is* a default arch, or - * we just want to ignore the default arch - * @return <value>, zero if not found - */ - public int getAttributeValue(String attr, ArchObject defarch) { - String AText = archText.toString(); // The "real" Archtext from arch & defarch - String line; // tmp string - int i, j; - int result = 0; // returned value - - // Add all attributes from defarch that don't already exist in AText - if (defarch != null) { - AText = AText+diffArchText(defarch.getArchText(), true); - } - - if (!AText.endsWith("\n")) { - AText = AText.concat("\n"); // string should end with '\n', see below - } - - attr = attr.trim()+" "; // attr must be followed by space - - // Check line by line for the string 'attr' - for (i = 0, j = 0; i < AText.length(); i++) { - if (AText.charAt(i) == '\n') { - line = AText.substring(j, i).trim(); // get one line from 'AText' - - try { - // try to read the value behind 'attr' - if (line.startsWith(attr)) { - result = Integer.parseInt(line.substring(attr.length()).trim()); - } - } catch (NumberFormatException e) { - result = 0; - } - - j = i+1; - } - } - return result; - } - - /** - * Get the String of an arch attribute from the archText - * both of the arch itself and if n.e. in it's default arch. - * If the attribute doesn't exist in either one, an empty - * String "" is returned. - * - * @param attr search for "attr <string>" - * @param defarch deault arch of 'this' arch - * defarch=null means this *is* a default arch, or - * we just want to ignore the default arch - * @return <string>, "" if not found - */ - public String getAttributeString(String attr, ArchObject defarch) { - String AText = archText.toString(); // The "real" Archtext from arch & defarch - String line; // tmp string - int i, j; - String result = ""; // returned String - attr = attr.trim()+" "; // attr must be followed by space - if (defarch == getDefaultArch()) { - result = getCachedAttributeValue(attr); - if (result != null) { - return result; - } - result = ""; - } - // Add all attributes from defarch that don't already exist in AText - if (defarch != null) { - AText = AText+diffArchText(defarch.getArchText(), true); - } - - if (!AText.endsWith("\n")) { - AText = AText.concat("\n"); // string should end with '\n', see below - } - - // Check line by line for the string 'attr' - for (i = 0, j = 0; i < AText.length(); i++) { - if (AText.charAt(i) == '\n') { - line = AText.substring(j, i).trim(); // get one line from 'AText' - - // take the String behind 'attr' - if (line.startsWith(attr)) { - result = line.substring(attr.length()).trim(); - } - - j = i+1; - } - } - if (defarch == getDefaultArch()) { - setCachedAttributeValue(attr, result); - } - - return result; - } - - /** - * Set the String of an arch attribute in the archText. - * - * @param attr search for "attr <string>" - * @param value value to set - */ - public void setAttributeString(String attr, String value) { - String AText = archText.toString(); // The "real" Archtext from arch - String line; // tmp string - boolean exists = false; - int i, j; - String result = ""; // returned String - - attr = attr.trim()+" "; // attr must be followed by space - - if (!AText.endsWith("\n")) { - AText = AText.concat("\n"); // string should end with '\n', see below - } - - // Check line by line for the string 'attr' - for (i = 0, j = 0; i < AText.length(); i++) { - if (AText.charAt(i) == '\n') { - line = AText.substring(j, i).trim(); // get one line from 'AText' - - // take the String behind 'attr' - if (!line.startsWith(attr)) { - result += line+"\n"; - } else { - result += attr+value+"\n"; - exists = true; - } - - j = i+1; - } - } - if (!exists) { - result += attr+value+"\n"; - } - - if (result.length() > 0 && result.charAt(0) == '\n') { - result = result.substring(1); - } - - setArchText(result); - } - - /** - * Remove the String of an arch attribute from the archText. - * - * @param attr search for "attr <string>" - */ - public void removeAttribute(String attr) { - String AText = archText.toString(); // The "real" Archtext from arch - String line; // tmp string - int i, j; - String result = ""; // returned String - - attr = attr.trim()+" "; // attr must be followed by space - - if (!AText.endsWith("\n")) { - AText = AText.concat("\n"); // string should end with '\n', see below - } - - // Check line by line for the string 'attr' - for (i = 0, j = 0; i < AText.length(); i++) { - if (AText.charAt(i) == '\n') { - line = AText.substring(j, i).trim(); // get one line from 'AText' - - // take the String behind 'attr' - if (!line.startsWith(attr)) { - result += line+"\n"; - } - - j = i+1; - } - } - if (result.length() > 0 && result.charAt(0) == '\n') { - result = result.substring(1); - } - - setArchText(result); - } - - /** - * If there is elevation data in the other arch, move it to here. - * - * @param arch the other arch - */ - public void propagateElevation(ArchObject arch) { - if (arch == null) { - return; - } - - String elevation = arch.getAttributeString("elevation", null); - if (!elevation.equals("")) { - setAttributeString("elevation", elevation); - arch.removeAttribute("elevation"); - } - } - - public void setEditType(int t) { edit_type = t; } - public int getInternTemp() { return intern_temp; } - public void setInternTemp(int t) { intern_temp = t; } - public int getMyID() { return my_id; } - public void setMyID(int num) { my_id = num; } - public ArchObject getContainer() { return _env; } - - /** - * Get the topmost container that 'this' arch is in. - * @return the topmost container - */ - public ArchObject getTopContainer() { - ArchObject tmp_arch; - - for (tmp_arch = this; tmp_arch.getContainer() != null; - tmp_arch = tmp_arch.getContainer()); - - return tmp_arch; - } - - public void setArtifactFlag(boolean aflag) { - artifacts_flag = aflag; - } - - public boolean getArtifactFlag() { - return artifacts_flag; - } - - /** - * Return a ListIterator for all inventory {@link ArchObject}s. - */ - public ListIterator getInventory() { - return Collections.unmodifiableList(_inv).listIterator(); - } - - /** - * The given <code>ArchObject</code> 'arch' is placed as inventory - * into 'this' <code>ArchObject</code>. (Keep in mind that 'arch' - * has to be a free (unlinked) instance of <code>ArchObject</code>.) - * - * @param arch the <code>ArchObject</code> to be placed in the inventory - */ - public void addInvObj(ArchObject arch) { - // arch must not be already in a container - if (arch._env != null) { - throw new IllegalArgumentException(); - } - - if (_inv == Collections.EMPTY_LIST) { - _inv = new LinkedList(); - } - - _inv.add(arch); - arch._env = this; - - arch.setMapX(getMapX()); - arch.setMapY(getMapY()); - } - - /** - * Remove 'this' arch from the inventory-list and delete all it's pointers - */ - public void removeInvObj() { - // object's inventory must have already been deleted - if (_inv != Collections.EMPTY_LIST) { - throw new IllegalArgumentException(); - } - - // object must be in a container - if (_env == null) { - throw new IllegalArgumentException(); - } - - // remove this object from its parent container - if (!_env._inv.remove(this)) { - throw new AssertionError(); - } - - if (_env._inv.size() == 0) { - _env._inv = Collections.EMPTY_LIST; - } - } - - /** - * Remove all inventory objects. - */ - public void clearInventory() { - while (_inv.size() > 0) { - ArchObject inv = (ArchObject)_inv.get(0); - inv.clearInventory(); - inv.removeInvObj(); - } - } - - /** - * browse through the inventory tree and count all elements - * @return number of objects in the inventory - */ - public int countInvObjects() { - int count = _inv.size(); - Iterator it = _inv.iterator(); - while (it.hasNext()) { - ArchObject arch = (ArchObject)it.next(); - count += arch.countInvObjects(); - } - return count; - } - - // ---- GET/SET methods for multi arches - public int getRefMaxX() { - if (multi != null) { - return multi.getRefMaxx(); - } - - return 0; - } - - public int getRefMaxY() { - if (multi != null) { - return multi.getRefMaxy(); - } - - return 0; - } - - public int getRefMaxMX() { - if (multi != null) { - return multi.getRefMaxxm(); - } - - return 0; - } - - public int getRefMaxMY() { - if (multi != null) { - return multi.getRefMaxym(); - } - - return 0; - } - - public void setRefMaxMX(int x) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - multi.setRefMaxxm(x); - } - - public void setRefMaxMY(int y) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - multi.setRefMaxym(y); - } - - public void setRefMaxX(int x) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - if (x < 0 && x < multi.getRefMaxxm()) { - multi.setRefMaxxm(x); - } else if (x > multi.getRefMaxx()) { - multi.setRefMaxx(x); - } - } - - public void setRefMaxY(int y) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - - if (y < 0 && y < multi.getRefMaxym()) { - multi.setRefMaxym(y); - } - if (y > multi.getRefMaxy()) { - multi.setRefMaxy(y); - } - } - - public void setRefFlag(boolean bool) { - //if (multi == null) { - // multi = new MultiArchData(); - //} - multi.setRefflag(bool); - } - - public boolean getRefFlag() { - if (multi != null) { - return multi.getRefflag(); - } - - return false; - } - - // this chained multi tiles on map for fast access. better then number and search trash - public void setMapMultiHead(ArchObject arch) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setHead(arch); // this points to head. Heads DON'T points to himself - } - - public void setMapMultiNext(ArchObject arch) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setNext(arch); // if this is null and head != null = last tile - } - - public ArchObject getMapMultiHead() { - if (multi != null) { - return multi.getHead(); // this points to head. Heads points to itsself - } - - return null; - } - - public ArchObject getMapMultiNext() { - if (multi != null) { - return multi.getNext(); // if this is null and head != null = last tile - } - - return null; - } - - public int getMultiShapeID() { - if (multi != null) { - return multi.getMultiShapeID(); - } - - return 0; - } - - public void setMultiShapeID(int value) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setMultiShapeID(value); - } - - public int getMultiPartNr() { - if (multi != null) { - return multi.getMultiPartNr(); - } - - return 0; - } - - public void setMultiPartNr(int value) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setMultiPartNr(value); - } - - public boolean isLowestPart() { - if (multi != null) { - return multi.isLowestPart(); - } - - return false; - } - - public void setLowestPart(boolean state) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setLowestPart(state); - } - - // Set Ref. Number of a multi part arch. - // RefNr == -1 : single tile - // RefNr == NodeNr : head (first) tile of a multi tile arch - // RefNr != NodeNr : part of multi tile arch - public void setRefNr(int nr) { - if (multi == null) { - if (nr != -1) { - multi = new MultiArchData(); - multi.setRefNr(nr); - } - } else { - multi.setRefNr(nr); - } - } - - // Get Ref. Number of a multi part arch. - // RefNr == -1 : single tile - // RefNr == NodeNr : head (first) tile of a multi tile arch - // RefNr != NodeNr : part of multi tile arch - public int getRefNr() { - if (multi != null) { - return multi.getRefNr(); - } - - return -1; // single tile - } - - // refx/refy: Offset of this multi tile from head tile - public void setRefX(int xoff) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setRefX(xoff); - } - - public void setRefY(int yoff) { - if (multi == null) { - multi = new MultiArchData(); - } - - multi.setRefY(yoff); - } - - public int getRefX() { - if (multi != null) { - return multi.getRefX(); - } - - return 0; - } - - public int getRefY() { - if (multi != null) { - return multi.getRefY(); - } - - return 0; - } - - public void setRefCount(int count) { - if (multi == null) { - if (count != 0) { - multi = new MultiArchData(); - multi.setRefCount(count); - } - } else { - multi.setRefCount(count); - } - } - - /** - * Returns number of parts for multipart heads. - * (*.getRefCount() > 0) is often used as way to find multi-heads. - * @return number of parts - */ - public int getRefCount() { - if (multi != null) { - return multi.getRefCount(); - } - - return 0; - } - - public boolean isMD() { - return multi != null; - } - - /** - * Initialize the multipart data object - must only be called for multipart arches - */ - public void initMultiData() { - if (multi == null) { - multi = new MultiArchData(); - } - } - // ----- end multi-arch get/set ----- - - public int getArchTypNr() { - return arch_type; - } - - public void setArchTypNr(int type) { - arch_type = type; - } - - public void setMapX(int x) { - mapx = x; - } - - public void setMapY(int y) { - mapy = y; - } - - public int getMapX() { - return mapx; - } - - public int getMapY() { - return mapy; - } - - public void setNextArch(ArchObject arch) { - next = arch; - } - - public void setPrevArch(ArchObject arch) { - prev = arch; - } - - public ArchObject getTemp() { - return tempptr; - } - - public void setTemp(ArchObject temp) { - tempptr = temp; - } - - public ArchObject getNextArch() { - return next; - } - - public ArchObject getPrevArch() { - return prev; - } - - /* Set the default face. Number is index of face list */ - public void setFaceNr(int nr) { - facenr = nr; - } - - /* Get the default face. Number is index of face list */ - public int getFaceNr() { - return facenr; - } - - public boolean getFaceFlag() { - return noface; - } - - public void setFaceFlag(boolean flag) { - noface = flag; - } - - /* Set Node number. Node number is the index of the default arch node list */ - public void setNodeNr(int nr) { - nodenr = nr; - } - - /* Get Node number. Node number is the index of the default arch node list */ - public int getNodeNr() { - return nodenr; - } - - // Arch name - public void setArchName(String name) { - archName = name != null ? name.intern() : null; - } - - public String getArchName() { - return archName; - } - - /** - * Name which is best appropriate to describe this arch. (This can be - * arch/object name or default arch/object name) - * @param defaultArch the default arch (if available, faster to use it than look it up again) - * @return best suitable descriptive name - */ - public String getBestName(ArchObject defaultArch) { - if (getObjName() != null && getObjName().length() > 0) { - return getObjName(); - } else if (defaultArch != null && defaultArch.getObjName() != null && defaultArch.getObjName().length() > 0) { - return defaultArch.getObjName(); - } else if (getArchName() != null && getArchName().length() > 0) { - return getArchName(); - } else if (defaultArch != null && defaultArch.getArchName() != null) { - return defaultArch.getArchName(); - } - - return "???"; // this case should actually never happen - } - - // Obj name - public void setObjName(String name) { - objName = name != null ? name.intern() : null; - } - - public String getObjName() { - return objName; - } - - // face name - public void setFaceName(String name) { - faceName = name != null ? name.intern() : null; - } - - public String getFaceName() { - return faceName; - } - - /** - * append 'text' to the archText of this arch - * @param text text to add - */ - public void addArchText(String text) { - archText.append(text); - } - - /** - * set 'text' = archText of this arch - * @param text set this text - */ - public void setArchText(String text) { - archText.delete(0, archText.length()); - archText.append(text); - clearCachedAttributeValue(); - } - - /** - * returns the archText of this arch as String - * @return the archtext - */ - public String getArchText() { - return archText.toString(); - } - - /** - * deletes the archText of this arch - */ - public void resetArchText() { - archText.delete(0, archText.length()); - } - - /** - * Get all entries from the given archtext 'atxt' that don't exist - * in 'this' archtext. - * - * @param atxt archtext to compare 'this'-arch with - * @param ignore_values if true: the values in the archtext-entries - * are ignored at the comparison - * @return all lines from 'atxt' that don't occur in 'this' arch - */ - public String diffArchText(String atxt, boolean ignore_values) { - String line = ""; // tmp string - String result = ""; // return string - String test; - int i, j; - int pos; - char c; - - if (!atxt.endsWith("\n")) { - atxt = atxt.concat("\n"); // string should end with '\n', see below - } - - // Check line by line for comparison - for (i = 0, j = 0; i < atxt.length(); i++) { - if (atxt.charAt(i) == '\n') { - line = atxt.substring(j, i).trim(); // get one line from 'atxt' - - // if 'line' does NOT exist in 'this' arch, we take it: - if (ignore_values) { - // cut away everything after the first space in that line - // because we want to ignore the "value part": - if (line.length() > 0 && line.indexOf(" ") > 0 && - diffTextString(this.getArchText(), line.substring(0, line.indexOf(" ")+1), ignore_values) == null) { - result = result.concat(line+"\n"); - } - } else { - // not ignoring the value-part - try { - test = diffTextString(this.getArchText(), line, ignore_values); - c = '\n'; - if (test != null) { - c = test.charAt(0); - } - - // An entry is taken if it doesn't exists in 'this' archtext - // at all, or it doesn't have the same lenght - if (line.length() > 0 && (test == null || c == '\n')) { - result = result.concat(line+"\n"); - } - } catch (StringIndexOutOfBoundsException e) { - } - } - - j = i+1; - } - } - - return result; - } - - /** - * Helper function for 'diffArchText()': - * Looks for occurrence of the attribute 'str' in 'base' and if found, - * returns the full line where 'str' occurs in base. - * Only occurrences of 'str' at the beginning of a new line are counted as valid. - * If not found, null is returned. - * - * @param base full text to search - * @param str string (attribute) to look for - * @param ignore_values if true, lines are matched against 'str' only till the first space (" ") - */ - private static String diffTextString(String base, String str, boolean ignore_values) { - int i, j; - String line = ""; - - if (!base.endsWith("\n")) { - base = base.concat("\n"); // string should end with '\n' - } - if (!line.endsWith("\n")) { - line = line.concat("\n"); // string should end with '\n' - } - - // Check line by line for comparison - for (i = 0, j = 0; i < base.length(); i++) { - if (base.charAt(i) == '\n') { - line = base.substring(j, i).trim(); // get one line from base - if (ignore_values) { - if (str.compareTo(line.substring(0, line.indexOf(" ")+1)) == 0) { - return line; - } - } else { - if (str.compareTo(line) == 0) { - return line; - } - } - j = i+1; - } - } - return null; - } - - - public void deleteMsgText() { - msgText = null; - } - - public void resetMsgText() { - if (msgText == null) { - return; - } - - msgText.delete(0, msgText.length()); - } - - // MSGText! - public void addMsgText(String text) { - if (msgText == null) { - msgText = new StringBuffer(); - } - - if (text == null) { // special, this adds a clear string - return; - } - - msgText.append(text); - } - - public String getMsgText() { - if (msgText == null) { - return null; - } - - return msgText.toString(); - } - - // ANIMText! - public void addAnimText(String text) { - if (animText == null) { - animText = new StringBuffer(""); - } - - animText.append(text); - } - - public String getAnimText() { - if (animText == null) { - return null; - } - - return animText.toString(); - } - - // lore text - public String getLoreText() { - return loreText.toString(); - } - - public void addLoreText(String text) { - if (loreText == null) { - loreText = new StringBuffer(""); - } - - loreText.append(text); - } - - // number of string line in text buffer of this arch - public int getArchTextCount() { - return archTextCount; - } - - // set/get autojoin list - public void setJoinList(AutojoinList jlist) { join = jlist; } - public AutojoinList getJoinList() { return join; } - - /** - * returns a new ArchObject, containing a copy of 'this' arch. - * References of course cannot be copied that way! - * This does NOT work for multipart objects. - * Also note that the returned clone is not linked to any map. - * - * @param posx map x coords. for the returned clone - * @param posy map y coords. for the returned clone - * @return clone instance of this <code>ArchObject</code> - */ - public ArchObject getClone(int posx, int posy) { - ArchObject clone = new ArchObject(); // The clone is a new object! - - clone.faceName = faceName; // face name - clone.archName = archName; // arch Name - clone.objName = objName; - - // the arch text (contains only the differences from default arch) - if (archText != null) { - clone.archText = new StringBuffer(archText.toString()); - } else { - clone.archText = null; - } - clone.archTextCount = archTextCount; // lines of text in archText - - // msg text buffer - if (msgText != null) { - clone.msgText = new StringBuffer(msgText.toString()); - } else { - clone.msgText = null; - } - - // anim text buffer - if (animText != null) { - clone.animText = new StringBuffer(animText.toString()); - } else { - clone.animText = null; - } - - if (multi != null) { - clone.multi = multi.getClone(); // clone multi data - } - - if (script != null) { - clone.script = script.getClone(); // clone scripting data - } - - clone.nodenr = nodenr; // node of the default arch - - clone.noface = noface; // if true, arch has no face as default - clone.facenr = facenr; // the index of faceImages[] - clone.editflag = editflag; // if true, object is in a editor - clone.edit_type = edit_type; // bitmask for view-settings - - clone.arch_type = arch_type; // type attribute of the arch - - // set coords: - clone.mapx = posx; - clone.mapy = posy; - - // If 'this' arch is a container, we have to create clones - // of the whole inventory (recursively) and link them in: - Iterator it = _inv.iterator(); - while (it.hasNext()) { - ArchObject tmp = (ArchObject)it.next(); - clone.addInvObj(tmp.getClone(posx, posy)); - } - - return clone; - } - - /** - * @return true if 'this' arch is a container (has something - * inside), otherwise false - */ - public boolean isContainer() { - return _inv.size() > 0; - } - - /** - * @return true if 'this' arch is part of a multisquare object - */ - public boolean isMulti() { - return multi != null && (multi.getRefflag() || multi.getRefCount() > 0); - } - - public void addEventPlugin(String eventType, String pluginName) { - if (script == null) { - script = new ScriptArchData(); - } - script.addEventData(eventType, pluginName, ScriptArchData.EDATA_PLUGIN_NAME); - } - - public void addEventOptions(String eventType, String eventOptions) { - if (script == null) { - script = new ScriptArchData(); - } - script.addEventData(eventType, eventOptions, ScriptArchData.EDATA_EVENT_OPTIONS); - } - - public void addEventScript(String eventType, String filePath) { - if (script == null) { - script = new ScriptArchData(); - } - script.addEventData(eventType, filePath, ScriptArchData.EDATA_FILE_PATH); - } - - /** - * Check wether all events have enough data to be valid. - * Invalid or insufficient ScriptedEvent objects get removed. - */ - public void validateAllEvents() { - if (script != null) { - if (!script.validateAllEvents()) { - script = null; // remove empty script object - } - } - } - - /** - * @return true when this arch has one or more scripted events defined - */ - public boolean isScripted() { - return script != null; - } - - /** - * This method is called from CMapFileEncode.writeMapArch() - * @return text for all scripted events, how it is written in a mapfile - */ - public String getMapArchEventData() { - if (script != null) { - return script.getMapArchEventData(); - } - - return ""; // this case should actually never happen - } - - /** - * Set contents of JList to all existing scripted events. - * @param list the JList which displays all events for this arch - */ - public void addEventsToJList(JList list) { - if (script != null) { - script.addEventsToJList(list); - } - } - - /** - * If there is a scripted event of the specified type, the script pad - * is opened and the appropriate script displayed. - * - * @param eventType type of event - * @param task ID number for task (open script/ edit path/ remove) - * @param eventList JList from the MapArchPanel (script tab) which displays the events - * @param mapanel the MapArchPanel - */ - public void modifyEventScript(String eventType, int task, JList eventList, CMapArchPanel mapanel) { - if (script != null) { - script.modifyEventScript(eventType, task, eventList); - - if (script.isEmpty()) { - script = null; // delete ScriptArchData object if empty - mapanel.setScriptPanelButtonState(true, false, false, false); - } - } - } - - /** - * A popup is opened and the user can create a new scripting event - * which gets attached to this arch. - * - * @param eventList JList from the MapArchPanel (script tab) which displays the events - * @param mapanel the MapArchPanel - */ - public void addEventScript(JList eventList, CMapArchPanel mapanel) { - if (script == null) { - script = new ScriptArchData(); - } - script.addEventScript(eventList, this); - - if (!script.isEmpty()) { - mapanel.setScriptPanelButtonState(true, true, true, true); - script.addEventsToJList(eventList); - } else { - script = null; // delete ScriptArchData object if empty - mapanel.setScriptPanelButtonState(true, false, false, false); - } - } - - /** - * This method checks the archText for syntax errors. More - * precisely: It reads every line in the archText and looks if - * it matches the type-definitions (-> see CFArchTypeList) for this - * arch. If there is no match, the line is considered wrong. - * Of course the type-definitions will never be perfect, this - * should be kept in mind. - * Note that the default arch is ignored in the check. The default - * arches should be correct, and even if not - it isn't the mapmaker to blame. - * - * @param type the type structure belonging to this arch. - * if null, the type is calculated in this function - * @return A String with all lines which don't match the type-definitions.<br> - * If no such "errors" encountered, null is returned. - */ - public String getSyntaxErrors(CFArchType type) { - ArchObject defarch = getDefaultArch(); - - if (typelist != null && archText != null && archText.length() > 0) { - String errors = ""; // return value: all error lines - - // open a reading stream for the archText - StringReader sread = new StringReader(archText.toString()); - BufferedReader sstream = new BufferedReader(sread); - - try { - String line = null; // read line - String attr_key; // key-part of the attribute in 'line' - boolean does_match; // true if line matches (/ is correct) - - if (type == null) { - type = typelist.getTypeOfArch(this); // the type of this arch - } - - if (log.isDebugEnabled()) { - log.debug("Applying type: "+type.getTypeName()); - } - - do { - line = sstream.readLine(); // read one line - - if (line != null && line.length() > 0) { - line = line.trim(); - - // get only the key-part of the attribute - if (line.indexOf(" ") <= 0) { - // this line doesn't even have the proper format: "key value" - // we assume the missing value part means zero-value - attr_key = line; - } else { - attr_key = line.substring(0, line.indexOf(" ")); - } - - if (log.isDebugEnabled()) { - log.debug("read attribute '"+line+"' -> "); - } - - // now check if there's a match in the definitions - does_match = false; - for (int t = 0; t < type.getAttr().length && !does_match; t++) { - if (type.getAttr()[t].getNameOld().equals(attr_key)) { - // found a match: - does_match = true; - } - } - - if (!does_match) { - errors += line.trim()+"\n"; // append line to the errors - /* - // the attribute doesn't match the definitions, - // now check if it is a negation of an entry in the default arch - if (line.indexOf(" ") >= 0) { - String attr_val = line.substring(line.indexOf(" ")).trim(); - if (!(defarch.getAttributeString(attr_key, null).length() > 0 && - (attr_val.equals("0") || attr_val.equals("null") || - attr_val.equals("none")))) { - errors += line.trim()+"\n"; // append line to the errors - } - } else { - errors += line.trim()+"\n"; // append line to the errors - } - */ - } - } - } while (line != null && line.length() > 0); - - // close streams - sstream.close(); - sread.close(); - } catch (IOException e) { - log.error("in getSyntaxErrors: Cannot close StringReader", e); - } - - // return errors, or null if empty - if (errors.trim().length() == 0) { - return null; - } - - return errors; - } else { - return null; - } - } - - private void setCachedAttributeValue(String name, String value) { - cachedAttribute.put(name, value); - } - - private void unSetCachedAttributeValue(String name) { - cachedAttribute.remove(name); - } - - private void clearCachedAttributeValue() { - cachedAttribute.clear(); - } - - private String getCachedAttributeValue(String name) { - return (String)cachedAttribute.get(name); - } -} Deleted: trunk/crossfire/src/cfeditor/ArchObjectIterator.java =================================================================== --- trunk/crossfire/src/cfeditor/ArchObjectIterator.java 2006-05-26 00:09:33 UTC (rev 21) +++ trunk/crossfire/src/cfeditor/ArchObjectIterator.java 2006-05-26 00:35:12 UTC (rev 22) @@ -1,41 +0,0 @@ -/* $Id: ArchObjectIterator.java,v 1.1 2006/04/06 17:16:03 akirschbaum Exp $ */ - -package cfeditor; - -import java.util.Iterator; -import java.util.NoSuchElementException; - -/** - * The class ArchObjectIterator implements an {@link java.util.Iterator} that - * returns all {@link ArchObject}s in a map location. - * - * @author Andreas Kirschbaum - */ -public class ArchObjectIterator implements Iterator -{ - protected ArchObject _nextArchObject; - - protected ArchObject _currArchObject = null; - - public ArchObjectIterator(ArchObject archObject) { - _nextArchObject = archObject; - } - - public boolean hasNext() { - return _nextArchObject != null; - } - - public Object next() { - if (_nextArchObject == null) { - throw new NoSuchElementException(); - } - - _currArchObject = _nextArchObject; - _nextArchObject = _currArchObject.getNextArch(); - return _currArchObject; - } - - public void remove() { - throw new UnsupportedOperationException(); - } -} Deleted: trunk/crossfire/src/cfeditor/ArchObjectIteratorDeleteArchMapObject.java =================================================================== --- trunk/crossfire/src/cfeditor/ArchObjectIteratorDeleteArchMapObject.java 2006-05-26 00:09:33 UTC (rev 21) +++ trunk/crossfire/src/cfeditor/ArchObjectIteratorDeleteArchMapObject.java 2006-05-26 00:35:12 UTC (rev 22) @@ -1,34 +0,0 @@ -/* $Id: ArchObjectIteratorDeleteArchMapObject.java,v 1.1 2006/04/06 17:16:03 akirschbaum Exp $ */ - -package cfeditor; - -import java.util.Iterator; - -/** - * The class ArchObjectIterator implements an {@link ArchObjectIterator} that - * implements the {@link java.util.Iterator#remove()} operation via {@link - * CMapModel#deleteArchMapObject(ArchObject)}. - * - * @author Andreas Kirschbaum - */ -public class ArchObjectIteratorDeleteArchMapObject extends ArchObjectIterator implements Iterator -{ - private final CMapModel _model; - - public ArchObjectIteratorDeleteArchMapObject(CMapModel model, ArchObject archObject) { - super(archObject); - - if(model == null) throw new IllegalArgumentException(); - - _model = model; - } - - public void remove() { - if (_currArchObject == null) { - throw new IllegalStateException(); - } - - _model.deleteArchMapObject(_currArchObject); - _currArchObject = null; - } -} Deleted: trunk/crossfire/src/cfeditor/ArchObjectIteratorDeleteMapArch.java =================================================================== --- trunk/crossfire/src/cfeditor/ArchObjectIteratorDeleteMapArch.java 2006-05-26 00:09:33 UTC (rev 21) +++ trunk/crossfire/src/cfeditor/ArchObjectIteratorDeleteMapArch.java 2006-05-26 00:35:12 UTC (rev 22) @@ -1,46 +0,0 @@ -/* $Id: ArchObjectIteratorDeleteMapArch.java,v 1.1 2006/04/06 17:16:03 akirschbaum Exp $ */ - -package cfeditor; - -import java.util.Iterator; - -/** - * The class ArchObjectIterator implements an {@link ArchObjectIterator} that - * implements the {@link java.util.Iterator#remove()} operation via {@link - * CMapModel#deleteMapArch(int, int, int, boolean, boolean)}. - * - * @author Andreas Kirschbaum - */ -public class ArchObjectIteratorDeleteMapArch extends ArchObjectIterator implements Iterator -{ - private final CMapModel _model; - - private final int _x; - - private final int _y; - - private final boolean _refreshMap; - - private final boolean _join; - - public ArchObjectIteratorDeleteMapArch(CMapModel model, ArchObject archObject, int x, int y, boolean refreshMap, boolean join) { - super(archObject); - - if(model == null) throw new IllegalArgumentException(); - - _model = model; - _x = x; - _y = y; - _refreshMap = refreshMap; - _join = join; - } - - public void remove() { - if (_currArchObject == null) { - throw new IllegalStateException(); - } - - _model.deleteMapArch(_currArchObject.getMyID(), _x, _y, _refreshMap, _join); - _currArchObject = null; - } -} Deleted: trunk/crossfire/src/cfeditor/ArchObjectParser.java =================================================================== --- trunk/crossfire/src/cfeditor/ArchObjectParser.java 2006-05-26 00:09:33 UTC (rev 21) +++ trunk/crossfire/src/cfeditor/ArchObjectParser.java 2006-05-26 00:35:12 UTC (rev 22) @@ -1,787 +0,0 @@ -/* - * Crossfire Java Editor. - * Copyright (C) 2000 Michael Toennies - * Copyright (C) 2001 Andreas Vogl - * - * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) - * - * 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 cfeditor; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.util.Hashtable; -import java.util.List; -import org.apache.log4j.Logger; -import org.jdom.Attribute; -import org.jdom.DataConversionException; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; - -/** - * The <code>ArchObjectParser</code> class handles the parsing of arches. - * - * @author <a href="mailto:mic...@no...">Michael Toennies</a> - * @author <a href="mailto:and...@gm...">Andreas Vogl</a> - */ -public class ArchObjectParser { - private static final Logger log = Logger.getLogger(ArchObjectParser.class); - - // name of the system-arch containing path of starting map - public static final String STARTARCH_NAME = "map"; - - // table with type numbers as keys (Integer), and type names as values (String) - private Hashtable archTypeNumbers; - - private final CMainControl m_control; - - /** - * Constructor - * @param control main control - */ - public ArchObjectParser(CMainControl control) { - m_control = control; - archTypeNumbers = null; - } - - /** - * Parse the typenumbers file (associate names with type numbers) - * Type numbers and names are stored as key-value pairs in the - * Hashtable 'archTypeNumbers'. - */ - public void loadTypeNumbers() { - CFileReader reader = null; // input reader - archTypeNumbers = new Hashtable(); - - try { - // open reading stream to the spells xml file - String baseDir = (IGUIConstants.isoView ? CMainControl.getInstance().getArchDefaultFolder()+File.separator+IGUIConstants.CONFIG_DIR : IGUIConstants.CONFIG_DIR); - reader = new CFileReader(baseDir, IGUIConstants.TYPENR_FILE); - - // parse xml document - SAXBuilder builder = new SAXBuilder(); - builder.setValidation(true); - Document doc = builder.build(reader.getReader()); - - // retrieve the spell data from the xml - Element root = doc.getRootElement(); - Element type_elem; - Attribute a; - if (root == null || !root.getName().equalsIgnoreCase("typenumbers")) { - log.warn("File '"+IGUIConstants.TYPENR_FILE+"' lacks root element 'typenumbers'."); - } else { - List types = root.getChildren("type"); - if (types == null || types.size() == 0) { - log.warn("File '"+IGUIConstants.TYPENR_FILE+"' has no content."); - } else { - // process all 'type' elements from the xml file - int i; - for (i = 0; i < types.size(); i++) { - type_elem = (Element)types.get(i); - - if (type_elem.getAttribute("number") == null) { - log.warn("In File '"+IGUIConstants.TYPENR_FILE+"': Found 'type' element without 'number'"); - ... [truncated message content] |
From: <chr...@us...> - 2006-05-26 00:09:56
|
Revision: 21 Author: christianhujer Date: 2006-05-25 17:09:33 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=21&view=rev Log Message: ----------- Unified animations. Modified Paths: -------------- trunk/crossfire/src/cfeditor/ArchObjectStack.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/arch/anim/AnimationObject.java Added Paths: ----------- trunk/crossfire/src/cfeditor/arch/ trunk/crossfire/src/cfeditor/arch/anim/ trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java Removed Paths: ------------- trunk/crossfire/src/cfeditor/AnimationObject.java trunk/crossfire/src/cfeditor/AnimationObjects.java Deleted: trunk/crossfire/src/cfeditor/AnimationObject.java =================================================================== --- trunk/crossfire/src/cfeditor/AnimationObject.java 2006-05-25 23:58:47 UTC (rev 20) +++ trunk/crossfire/src/cfeditor/AnimationObject.java 2006-05-26 00:09:33 UTC (rev 21) @@ -1,82 +0,0 @@ -/* - * Crossfire Java Editor. - * Copyright (C) 2000 Michael Toennies - * Copyright (C) 2001 Andreas Vogl - * Copyright (C) 2006 The Gridarta Developers - * - * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) - * - * 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 cfeditor; - -/** - * A single animation object. - */ -public class AnimationObject { - - /** The name of this animation. */ - private final String animName; - - /** The animation list of this animation. - * The individual entries are all postfixed with '\n'. - */ - private final String animList; - - /** - * Create an Animation Object. - * @param animName name of the animation - * @param animList list with frames - */ - public AnimationObject(final String animName, final String animList) { - this.animList = animList; - this.animName = animName; - } - - /** - * Returns the animation list of this animation. - * The individual entries are all postfixed with '\n'. - * @return the animation list of this animation. - */ - public String getAnimList() { - return animList; - } - - /** - * Returns the name of this animation. - * @return the name of this animation. - */ - public String getAnimName() { - return animName; - } - - /** - * {@inheritDoc} - * The String representation of an AnimObjectNode is suitable for writing into the animations file. - */ - @Override public String toString() { - final StringBuilder sb = new StringBuilder(); - sb.append("anim "); - sb.append(animName); - sb.append('\n'); - sb.append(animList); - sb.append("mina\n"); - return sb.toString(); - } - -} // End of class Deleted: trunk/crossfire/src/cfeditor/AnimationObjects.java =================================================================== --- trunk/crossfire/src/cfeditor/AnimationObjects.java 2006-05-25 23:58:47 UTC (rev 20) +++ trunk/crossfire/src/cfeditor/AnimationObjects.java 2006-05-26 00:09:33 UTC (rev 21) @@ -1,75 +0,0 @@ -/* - * Crossfire Java Editor. - * Copyright (C) 2000 Michael Toennies - * Copyright (C) 2001 Andreas Vogl - * Copyright (C) 2006 The Gridarta Developers - * - * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) - * - * 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 cfeditor; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.TreeSet; - -/** - * The <code>AnimationObject</code>. - * - * WARNING: This class uses two indexes which are independent of each other: index of animation object and index of animation name. - * - * @author <a href="mailto:mic...@no...">Michael Toennies</a> - */ -public class AnimationObjects implements Iterable<AnimationObject> { - - /** The animation objects. */ - private final List<AnimationObject> animObjects = new ArrayList<AnimationObject>(); - - /** Number of animation objects created. */ - private int numAnimObjects; - - /** Create the AnimationObject container. */ - public AnimationObjects() { - } - - /** {@inheritDoc} */ - public Iterator<AnimationObject> iterator() { - return new TreeSet<AnimationObject>(animObjects).iterator(); - } - - /** - * Add an animation object. - * @param name name of the animation object - * @param list list with individual frames - */ - public void addAnimObject(final String name, final String list) { - animObjects.add(new AnimationObject(name, list)); - numAnimObjects++; - } - - /** - * Returns number of animation objects created. - * @return number of animation objects created. - */ - public int getNumAnimObjects() { - return numAnimObjects; - } - -} // End of class Modified: trunk/crossfire/src/cfeditor/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/ArchObjectStack.java 2006-05-25 23:58:47 UTC (rev 20) +++ trunk/crossfire/src/cfeditor/ArchObjectStack.java 2006-05-26 00:09:33 UTC (rev 21) @@ -48,6 +48,8 @@ import javax.swing.JPanel; import javax.swing.JProgressBar; import org.apache.log4j.Logger; +import cfeditor.arch.anim.AnimationObject; +import cfeditor.arch.anim.AnimationObjects; /** * The <code>ArchObjectStack</code> contains all the default arches. @@ -831,7 +833,7 @@ // loop through all existing ArchPanels and find all arches // along with their display-cathegory for (CArchPanel.PanelNode node = CArchPanel.getStartPanelNode(); - node != null; node = node.next) { + node != null; node = node.next) { int[] numList = node.data.getListNodeNrArray(); // list of nodenumbers String[] cathList = node.data.getListCathegoryArray(); // list of cath. strings @@ -1159,7 +1161,7 @@ // loop through all existing ArchPanels and find all arches // along with their display-cathegory for (CArchPanel.PanelNode node = CArchPanel.getStartPanelNode(); - node != null; node = node.next) { + node != null; node = node.next) { int[] numList = node.data.getListNodeNrArray(); // list of nodenumbers String[] cathList = node.data.getListCathegoryArray(); // list of cath. strings Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-25 23:58:47 UTC (rev 20) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-26 00:09:33 UTC (rev 21) @@ -25,6 +25,7 @@ package cfeditor; import cfeditor.textedit.scripteditor.ScriptEditControl; +import cfeditor.arch.anim.AnimationObjects; import java.awt.Font; import java.awt.Point; import java.awt.Rectangle; Copied: trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java (from rev 18, trunk/crossfire/src/cfeditor/AnimationObject.java) =================================================================== --- trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java (rev 0) +++ trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java 2006-05-26 00:09:33 UTC (rev 21) @@ -0,0 +1,82 @@ +/* + * Crossfire Java Editor. + * Copyright (C) 2000 Michael Toennies + * Copyright (C) 2001 Andreas Vogl + * Copyright (C) 2006 The Gridarta Developers + * + * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) + * + * 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 cfeditor.arch.anim; + +/** + * A single animation object. + */ +public final class AnimationObject { + + /** The name of this animation. */ + private final String animName; + + /** The animation list of this animation. + * The individual entries are all postfixed with '\n'. + */ + private final String animList; + + /** + * Create an AnimationObject. + * @param animName name of the animation + * @param animList list with frames + */ + public AnimationObject(final String animName, final String animList) { + this.animName = animName; + this.animList = animList; + } + + /** + * Get the animName, which is the name of the animation as usable by the "animations" attribute. + * @return the name of this animation. + */ + public String getAnimName() { + return animName; + } + + /** + * Returns the animation list of this animation. + * The individual entries are all postfixed with '\n'. + * @return the animation list of this animation. + */ + public String getAnimList() { + return animList; + } + + /** + * {@inheritDoc} + * The String representation of an AnimObjectNode is suitable for writing into the animations file. + */ + @Override public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("anim "); + sb.append(animName); + sb.append('\n'); + sb.append(animList); + sb.append("mina\n"); + return sb.toString(); + } + +} // class AnimationObject Property changes on: trunk/crossfire/src/cfeditor/arch/anim/AnimationObject.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Copied: trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java (from rev 18, trunk/crossfire/src/cfeditor/AnimationObjects.java) =================================================================== --- trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java (rev 0) +++ trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java 2006-05-26 00:09:33 UTC (rev 21) @@ -0,0 +1,76 @@ +/* + * Crossfire Java Editor. + * Copyright (C) 2000 Michael Toennies + * Copyright (C) 2001 Andreas Vogl + * Copyright (C) 2006 The Gridarta Developers + * + * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) + * + * 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 cfeditor.arch.anim; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.TreeSet; +import cfeditor.arch.anim.AnimationObject; + +/** + * The <code>AnimationObject</code>. + * + * WARNING: This class uses two indexes which are independent of each other: index of animation object and index of animation name. + * + * @author <a href="mailto:mic...@no...">Michael Toennies</a> + */ +public class AnimationObjects implements Iterable<AnimationObject> { + + /** The animation objects. */ + private final List<AnimationObject> animObjects = new ArrayList<AnimationObject>(); + + /** Number of animation objects created. */ + private int numAnimObjects; + + /** Create the AnimationObject container. */ + public AnimationObjects() { + } + + /** {@inheritDoc} */ + public Iterator<AnimationObject> iterator() { + return new TreeSet<AnimationObject>(animObjects).iterator(); + } + + /** + * Add an animation object. + * @param name name of the animation object + * @param list list with individual frames + */ + public void addAnimObject(final String name, final String list) { + animObjects.add(new AnimationObject(name, list)); + numAnimObjects++; + } + + /** + * Returns number of animation objects created. + * @return number of animation objects created. + */ + public int getNumAnimObjects() { + return numAnimObjects; + } + +} // End of class Property changes on: trunk/crossfire/src/cfeditor/arch/anim/AnimationObjects.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: trunk/daimonin/src/daieditor/arch/anim/AnimationObject.java =================================================================== --- trunk/daimonin/src/daieditor/arch/anim/AnimationObject.java 2006-05-25 23:58:47 UTC (rev 20) +++ trunk/daimonin/src/daieditor/arch/anim/AnimationObject.java 2006-05-26 00:09:33 UTC (rev 21) @@ -3,6 +3,7 @@ * Copyright (C) 2000 Michael Toennies * Copyright (C) 2001 Andreas Vogl * Copyright (C) 2005 Christian Hujer + * Copyright (C) 2006 The Gridarta Developers * * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) * @@ -31,7 +32,8 @@ import java.util.List; import javax.swing.ImageIcon; -/** A single animation object. +/** + * A single animation object. * It holds the information like the number of frames used and the frames to display, as well as facings, which is the number of different * subanimations, for instance for different directions. * @author <a href="mailto:mic...@no...">Michael Toennies</a> @@ -39,10 +41,12 @@ */ public final class AnimationObject extends NamedObject { - /** The name of the animation. */ + /** The name of this animation. */ private final String animName; - /** The list of animations, separated with "\n". */ + /** The animation list of this animation. + * The individual entries are all postfixed with '\n'. + */ private final String animList; /** The names of the animation frames. */ @@ -54,7 +58,8 @@ /** The number of frames per facing in the animation. */ private final int frameCount; - /** Creates a new AnimObjectNode object and adds it to the datastructures. + /** + * Create an AnimationObject. * Therefore animList is parsed. * Do not invoke this constructor directly, use {@link daieditor.arch.anim.AnimationObjects#addAnimationObject(String,String)} instead. * If you invoke this constructor directly, the created AnimationObject will not be registered. @@ -93,16 +98,6 @@ return FaceFacade.normal.getFace(getFirstFrame(facings > 0 ? 1 : 0)); } - /** Get the animName, which is the name - * of the animation as usable - * by the "animations" attribute. - * @return animName - * @see #getName() - */ - public String getAnimName() { - return animName; - } - /** Get the number of frames per facing. * @return number of frames per facing */ @@ -139,11 +134,36 @@ return frames.get(facing * tmpFrameCount + frame); } - /** Get the animList. - * @return animList + /** + * Get the animName, which is the name of the animation as usable by the "animations" attribute. + * @return the name of this animation. + * @see #getName() */ + public String getAnimName() { + return animName; + } + + /** + * Returns the animation list of this animation. + * The individual entries are all postfixed with '\n'. + * @return the animation list of this animation. + */ public String getAnimList() { return animList; } -} // class AnimObjectNode + /** + * {@inheritDoc} + * The String representation of an AnimObjectNode is suitable for writing into the animations file. + */ + @Override public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("anim "); + sb.append(animName); + sb.append('\n'); + sb.append(animList); + sb.append("mina\n"); + return sb.toString(); + } + +} // class AnimationObject This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 23:58:53
|
Revision: 20 Author: christianhujer Date: 2006-05-25 16:58:47 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=20&view=rev Log Message: ----------- Removed Tests that belong to JAPI. Removed Paths: ------------- trunk/daimonin/src/test/daieditor/util/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 23:35:19
|
Revision: 19 Author: christianhujer Date: 2006-05-25 16:33:50 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=19&view=rev Log Message: ----------- Renamed cfeditor package to daieditor for distinguishing the daimonin editor from the crossfire editor to avoid confusion during refactoring. Modified Paths: -------------- trunk/daimonin/DaimoninEditor.jar trunk/daimonin/build.xml trunk/daimonin/src/daieditor/ArchUpdater.java trunk/daimonin/src/daieditor/CArchPanel.java trunk/daimonin/src/daieditor/CArchPanelPan.java trunk/daimonin/src/daieditor/CArchQuickView.java trunk/daimonin/src/daieditor/CAttribBitmask.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CFArchAttrib.java trunk/daimonin/src/daieditor/CFArchType.java trunk/daimonin/src/daieditor/CFArchTypeList.java trunk/daimonin/src/daieditor/CFJavaEditor.java trunk/daimonin/src/daieditor/CFTreasureListTree.java trunk/daimonin/src/daieditor/CFileInputStream.java trunk/daimonin/src/daieditor/CFileReader.java trunk/daimonin/src/daieditor/CGUIUtils.java trunk/daimonin/src/daieditor/CGridderException.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMainStatusbar.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/CMapArchPanel.java trunk/daimonin/src/daieditor/CMapFileDecode.java trunk/daimonin/src/daieditor/CMapFileEncode.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CMapViewBasic.java trunk/daimonin/src/daieditor/CMapViewIFrame.java trunk/daimonin/src/daieditor/CMapViewInterface.java trunk/daimonin/src/daieditor/CNewMapDialog.java trunk/daimonin/src/daieditor/CPickmapPanel.java trunk/daimonin/src/daieditor/CPreview.java trunk/daimonin/src/daieditor/CUndoStack.java trunk/daimonin/src/daieditor/CopyBuffer.java trunk/daimonin/src/daieditor/IGUIConstants.java trunk/daimonin/src/daieditor/IUndoable.java trunk/daimonin/src/daieditor/MapTilePane.java trunk/daimonin/src/daieditor/MultiArchData.java trunk/daimonin/src/daieditor/MultiPositionData.java trunk/daimonin/src/daieditor/PathManager.java trunk/daimonin/src/daieditor/ProcessRunner.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/ResourceFileManager.java trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/Spells.java trunk/daimonin/src/daieditor/SplashScreen.java trunk/daimonin/src/daieditor/Updater.java trunk/daimonin/src/daieditor/arch/ArchAttribType.java trunk/daimonin/src/daieditor/arch/ArchObject.java trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java trunk/daimonin/src/daieditor/arch/ArchObjectIterator.java trunk/daimonin/src/daieditor/arch/ArchObjectParser.java trunk/daimonin/src/daieditor/arch/ArchObjectStack.java trunk/daimonin/src/daieditor/arch/DuplicateArchException.java trunk/daimonin/src/daieditor/arch/NamedObject.java trunk/daimonin/src/daieditor/arch/NamedObjects.java trunk/daimonin/src/daieditor/arch/NamedTreeNode.java trunk/daimonin/src/daieditor/arch/RecursiveArchObjectIterator.java trunk/daimonin/src/daieditor/arch/anim/AnimationObject.java trunk/daimonin/src/daieditor/arch/anim/AnimationObjects.java trunk/daimonin/src/daieditor/arch/anim/AnimationParseException.java trunk/daimonin/src/daieditor/arch/anim/DuplicateAnimationException.java trunk/daimonin/src/daieditor/arch/face/DuplicateFaceException.java trunk/daimonin/src/daieditor/arch/face/FaceFacade.java trunk/daimonin/src/daieditor/arch/face/FaceObject.java trunk/daimonin/src/daieditor/arch/face/FaceObjects.java trunk/daimonin/src/daieditor/arch/match/AndArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ArchObjectMatchers.java trunk/daimonin/src/daieditor/arch/match/AttribArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/MutableNameArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/MutableOrArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/NamedArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/NotArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/OrArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/TypeNrsArchObjectMatcher.java trunk/daimonin/src/daieditor/arch/match/ViewArchObjectMatcherManager.java trunk/daimonin/src/daieditor/gui/AboutDialog.java trunk/daimonin/src/daieditor/gui/ConnectionView.java trunk/daimonin/src/daieditor/gui/DirectionLayout.java trunk/daimonin/src/daieditor/gui/ErrorListView.java trunk/daimonin/src/daieditor/gui/HideFileFilterProxy.java trunk/daimonin/src/daieditor/gui/MapFileFilter.java trunk/daimonin/src/daieditor/gui/map/LevelRenderer.java trunk/daimonin/src/daieditor/gui/map/MapCursor.java trunk/daimonin/src/daieditor/gui/map/MapCursorControl.java trunk/daimonin/src/daieditor/gui/map/MapCursorEvent.java trunk/daimonin/src/daieditor/gui/map/MapCursorListener.java trunk/daimonin/src/daieditor/gui/map/MapGrid.java trunk/daimonin/src/daieditor/gui/map/MapGridEvent.java trunk/daimonin/src/daieditor/gui/map/MapGridListener.java trunk/daimonin/src/daieditor/gui/map/MapPreviewAccessory.java trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java trunk/daimonin/src/daieditor/gui/map/MapTilePane.java trunk/daimonin/src/daieditor/gui/map/MapUserListener.java trunk/daimonin/src/daieditor/gui/map/MapViewSettings.java trunk/daimonin/src/daieditor/gui/map/MapViewSettingsEvent.java trunk/daimonin/src/daieditor/gui/map/MapViewSettingsListener.java trunk/daimonin/src/daieditor/gui/prefs/AppPrefs.java trunk/daimonin/src/daieditor/gui/prefs/DevPrefs.java trunk/daimonin/src/daieditor/gui/prefs/GUIPrefs.java trunk/daimonin/src/daieditor/gui/prefs/MapValidatorPrefs.java trunk/daimonin/src/daieditor/gui/prefs/MiscPrefs.java trunk/daimonin/src/daieditor/gui/prefs/NetPrefs.java trunk/daimonin/src/daieditor/gui/prefs/ResPrefs.java trunk/daimonin/src/daieditor/gui/prefs/UpdatePrefs.java trunk/daimonin/src/daieditor/help/DHelp.java trunk/daimonin/src/daieditor/icons/AbstractFaceProvider.java trunk/daimonin/src/daieditor/icons/ArchFaceProvider.java trunk/daimonin/src/daieditor/icons/DaimoninFaceProvider.java trunk/daimonin/src/daieditor/icons/FaceProvider.java trunk/daimonin/src/daieditor/icons/FilterFaceProvider.java trunk/daimonin/src/daieditor/map/ArchOutOfMapBoundsException.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/MapArchObject.java trunk/daimonin/src/daieditor/map/MapControl.java trunk/daimonin/src/daieditor/map/MapEvent.java trunk/daimonin/src/daieditor/map/MapListener.java trunk/daimonin/src/daieditor/map/MapModel.java trunk/daimonin/src/daieditor/map/MapModelEvent.java trunk/daimonin/src/daieditor/map/MapModelListener.java trunk/daimonin/src/daieditor/map/MapSquare.java trunk/daimonin/src/daieditor/map/validation/AbstractValidator.java trunk/daimonin/src/daieditor/map/validation/ArchValidationError.java trunk/daimonin/src/daieditor/map/validation/ArchValidator.java trunk/daimonin/src/daieditor/map/validation/ArchesValidationError.java trunk/daimonin/src/daieditor/map/validation/CorrectableError.java trunk/daimonin/src/daieditor/map/validation/DefaultErrorCollector.java trunk/daimonin/src/daieditor/map/validation/DelegatingMapValidator.java trunk/daimonin/src/daieditor/map/validation/ErrorCollector.java trunk/daimonin/src/daieditor/map/validation/ErrorHandler.java trunk/daimonin/src/daieditor/map/validation/MapValidationError.java trunk/daimonin/src/daieditor/map/validation/MapValidator.java trunk/daimonin/src/daieditor/map/validation/SquareValidationError.java trunk/daimonin/src/daieditor/map/validation/SquareValidator.java trunk/daimonin/src/daieditor/map/validation/ValidationError.java trunk/daimonin/src/daieditor/map/validation/Validator.java trunk/daimonin/src/daieditor/map/validation/checks/BlockedMobOrSpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/BlockedMobOrSpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedInsideContainerChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedInsideContainerError.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedPickableChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ConnectedPickableError.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleArchChecker.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleArchError.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleLayerChecker.java trunk/daimonin/src/daieditor/map/validation/checks/DoubleLayerError.java trunk/daimonin/src/daieditor/map/validation/checks/EmptySpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/EmptySpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/ExitChecker.java trunk/daimonin/src/daieditor/map/validation/checks/ExitError.java trunk/daimonin/src/daieditor/map/validation/checks/MobOutsideSpawnPointChecker.java trunk/daimonin/src/daieditor/map/validation/checks/MobOutsideSpawnPointError.java trunk/daimonin/src/daieditor/map/validation/checks/SlayingChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SlayingError.java trunk/daimonin/src/daieditor/map/validation/checks/SquareWithoutFloorChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SquareWithoutFloorError.java trunk/daimonin/src/daieditor/map/validation/checks/SysObjectOnLayerZeroChecker.java trunk/daimonin/src/daieditor/map/validation/checks/SysObjectOnLayerZeroError.java trunk/daimonin/src/daieditor/map/validation/checks/TilePathsChecker.java trunk/daimonin/src/daieditor/map/validation/checks/TilePathsError.java trunk/daimonin/src/daieditor/swing/DSplitPane.java trunk/daimonin/src/daieditor/textedit/scripteditor/CFPythonPopup.java trunk/daimonin/src/daieditor/textedit/scripteditor/ScriptEditControl.java trunk/daimonin/src/daieditor/textedit/scripteditor/ScriptEditMenuBar.java trunk/daimonin/src/daieditor/textedit/scripteditor/ScriptEditView.java trunk/daimonin/src/daieditor/textedit/textarea/CTokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/DefaultInputHandler.java trunk/daimonin/src/daieditor/textedit/textarea/HTMLTokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/InputHandler.java trunk/daimonin/src/daieditor/textedit/textarea/JEditTextArea.java trunk/daimonin/src/daieditor/textedit/textarea/JavaScriptTokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/KeywordMap.java trunk/daimonin/src/daieditor/textedit/textarea/LuaTokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/SyntaxDocument.java trunk/daimonin/src/daieditor/textedit/textarea/SyntaxStyle.java trunk/daimonin/src/daieditor/textedit/textarea/SyntaxUtilities.java trunk/daimonin/src/daieditor/textedit/textarea/TextAreaDefaults.java trunk/daimonin/src/daieditor/textedit/textarea/TextAreaPainter.java trunk/daimonin/src/daieditor/textedit/textarea/TextUtilities.java trunk/daimonin/src/daieditor/textedit/textarea/Token.java trunk/daimonin/src/daieditor/textedit/textarea/TokenMarker.java trunk/daimonin/src/daieditor/textedit/textarea/XMLTokenMarker.java trunk/daimonin/src/test/daieditor/gui/map/MapCursorTest.java trunk/daimonin/src/test/daieditor/map/validation/AbstractValidatorTest.java trunk/daimonin/src/test/daieditor/util/EnumerationIteratorTest.java trunk/daimonin/src/test/daieditor/util/NodeListIteratorTest.java trunk/daimonin/src/test/daieditor/util/PairTest.java trunk/daimonin/src/test/daieditor/util/TableTest.java trunk/daimonin/src/test/daieditor/util/UtilTest.java Added Paths: ----------- trunk/daimonin/src/daieditor/ trunk/daimonin/src/test/daieditor/ Removed Paths: ------------- trunk/daimonin/src/cfeditor/ trunk/daimonin/src/test/cfeditor/ Modified: trunk/daimonin/DaimoninEditor.jar =================================================================== (Binary files differ) Modified: trunk/daimonin/build.xml =================================================================== --- trunk/daimonin/build.xml 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/build.xml 2006-05-25 23:33:50 UTC (rev 19) @@ -162,7 +162,7 @@ </zipfileset> <!-- creating the manifest --> <manifest> - <attribute name="Main-Class" value="cfeditor.CFJavaEditor"/> + <attribute name="Main-Class" value="daieditor.CFJavaEditor"/> <attribute name="SplashScreen-Image" value="icons/CFIntro.gif" /> </manifest> </jar> @@ -203,7 +203,7 @@ encoding = "${build.source.encoding}" linksource = "yes" private = "yes" - overview = "src/cfeditor/overview.html" + overview = "src/daieditor/overview.html" link = "${user.javadoc.link}" > <classpath> Copied: trunk/daimonin/src/daieditor (from rev 18, trunk/daimonin/src/cfeditor) Modified: trunk/daimonin/src/daieditor/ArchUpdater.java =================================================================== --- trunk/daimonin/src/cfeditor/ArchUpdater.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/ArchUpdater.java 2006-05-25 23:33:50 UTC (rev 19) @@ -1,4 +1,4 @@ -package cfeditor; +package daieditor; /** The ArchUpdater is a class designed for updating the arch/ directory. * In its first versions, it will only update the <code>arch/dev/editor/conf/</code> directory, but in future versions maybe it will be extended to keep the whole <code>arch/</code> directory tree up to date. Modified: trunk/daimonin/src/daieditor/CArchPanel.java =================================================================== --- trunk/daimonin/src/cfeditor/CArchPanel.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CArchPanel.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,9 +22,9 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; +import daieditor.arch.ArchObject; import java.awt.BorderLayout; import java.util.ArrayList; import javax.swing.BorderFactory; Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/cfeditor/CArchPanelPan.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,10 +22,10 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; +import daieditor.arch.ArchObject; +import daieditor.arch.ArchObjectStack; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.ActionEvent; @@ -55,7 +55,7 @@ private static final long serialVersionUID = 1L; /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** Controller of this subview. */ private final CMainControl mainControl; Modified: trunk/daimonin/src/daieditor/CArchQuickView.java =================================================================== --- trunk/daimonin/src/cfeditor/CArchQuickView.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CArchQuickView.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,9 +22,9 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; +import daieditor.arch.ArchObject; import java.awt.Color; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; Modified: trunk/daimonin/src/daieditor/CAttribBitmask.java =================================================================== --- trunk/daimonin/src/cfeditor/CAttribBitmask.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CAttribBitmask.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,7 +22,7 @@ * */ -package cfeditor; +package daieditor; import java.awt.Component; import java.awt.GridLayout; Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/cfeditor/CAttribDialog.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,29 +22,29 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchAttribType; -import static cfeditor.arch.ArchAttribType.ANIMNAME; -import static cfeditor.arch.ArchAttribType.BITMASK; -import static cfeditor.arch.ArchAttribType.BOOL; -import static cfeditor.arch.ArchAttribType.BOOL_SPEC; -import static cfeditor.arch.ArchAttribType.DBLLIST; -import static cfeditor.arch.ArchAttribType.FACENAME; -import static cfeditor.arch.ArchAttribType.FIXED; -import static cfeditor.arch.ArchAttribType.FLOAT; -import static cfeditor.arch.ArchAttribType.INT; -import static cfeditor.arch.ArchAttribType.LIST; -import static cfeditor.arch.ArchAttribType.LONG; -import static cfeditor.arch.ArchAttribType.SPELL; -import static cfeditor.arch.ArchAttribType.STRING; -import static cfeditor.arch.ArchAttribType.TEXT; -import static cfeditor.arch.ArchAttribType.TREASURE; -import static cfeditor.arch.ArchAttribType.ZSPELL; -import cfeditor.arch.ArchObject; -import cfeditor.arch.NamedObject; -import cfeditor.arch.NamedObjects; -import cfeditor.help.DHelp; +import daieditor.arch.ArchAttribType; +import static daieditor.arch.ArchAttribType.ANIMNAME; +import static daieditor.arch.ArchAttribType.BITMASK; +import static daieditor.arch.ArchAttribType.BOOL; +import static daieditor.arch.ArchAttribType.BOOL_SPEC; +import static daieditor.arch.ArchAttribType.DBLLIST; +import static daieditor.arch.ArchAttribType.FACENAME; +import static daieditor.arch.ArchAttribType.FIXED; +import static daieditor.arch.ArchAttribType.FLOAT; +import static daieditor.arch.ArchAttribType.INT; +import static daieditor.arch.ArchAttribType.LIST; +import static daieditor.arch.ArchAttribType.LONG; +import static daieditor.arch.ArchAttribType.SPELL; +import static daieditor.arch.ArchAttribType.STRING; +import static daieditor.arch.ArchAttribType.TEXT; +import static daieditor.arch.ArchAttribType.TREASURE; +import static daieditor.arch.ArchAttribType.ZSPELL; +import daieditor.arch.ArchObject; +import daieditor.arch.NamedObject; +import daieditor.arch.NamedObjects; +import daieditor.help.DHelp; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Color; @@ -122,7 +122,7 @@ private static final long serialVersionUID = 1L; /** Action Factory. */ - private static final ActionFactory actionFactory = getFactory("cfeditor"); + private static final ActionFactory actionFactory = getFactory("daieditor"); // store width of input-textfields, then JChooseBoxes are set to this width too public static final int TEXTFIELD_COLUMNS = 18; // number of columns for textfields Modified: trunk/daimonin/src/daieditor/CFArchAttrib.java =================================================================== --- trunk/daimonin/src/cfeditor/CFArchAttrib.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,25 +22,25 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchAttribType; -import static cfeditor.arch.ArchAttribType.ANIMNAME; -import static cfeditor.arch.ArchAttribType.BITMASK; -import static cfeditor.arch.ArchAttribType.BOOL; -import static cfeditor.arch.ArchAttribType.BOOL_SPEC; -import static cfeditor.arch.ArchAttribType.DBLLIST; -import static cfeditor.arch.ArchAttribType.FACENAME; -import static cfeditor.arch.ArchAttribType.FIXED; -import static cfeditor.arch.ArchAttribType.FLOAT; -import static cfeditor.arch.ArchAttribType.INT; -import static cfeditor.arch.ArchAttribType.LIST; -import static cfeditor.arch.ArchAttribType.LONG; -import static cfeditor.arch.ArchAttribType.SPELL; -import static cfeditor.arch.ArchAttribType.STRING; -import static cfeditor.arch.ArchAttribType.TEXT; -import static cfeditor.arch.ArchAttribType.TREASURE; -import static cfeditor.arch.ArchAttribType.ZSPELL; +import daieditor.arch.ArchAttribType; +import static daieditor.arch.ArchAttribType.ANIMNAME; +import static daieditor.arch.ArchAttribType.BITMASK; +import static daieditor.arch.ArchAttribType.BOOL; +import static daieditor.arch.ArchAttribType.BOOL_SPEC; +import static daieditor.arch.ArchAttribType.DBLLIST; +import static daieditor.arch.ArchAttribType.FACENAME; +import static daieditor.arch.ArchAttribType.FIXED; +import static daieditor.arch.ArchAttribType.FLOAT; +import static daieditor.arch.ArchAttribType.INT; +import static daieditor.arch.ArchAttribType.LIST; +import static daieditor.arch.ArchAttribType.LONG; +import static daieditor.arch.ArchAttribType.SPELL; +import static daieditor.arch.ArchAttribType.STRING; +import static daieditor.arch.ArchAttribType.TEXT; +import static daieditor.arch.ArchAttribType.TREASURE; +import static daieditor.arch.ArchAttribType.ZSPELL; import org.w3c.dom.Attr; import org.w3c.dom.Element; Modified: trunk/daimonin/src/daieditor/CFArchType.java =================================================================== --- trunk/daimonin/src/cfeditor/CFArchType.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CFArchType.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,9 +22,9 @@ * */ -package cfeditor; +package daieditor; -import static cfeditor.arch.ArchAttribType.TEXT; +import static daieditor.arch.ArchAttribType.TEXT; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -383,7 +383,7 @@ * @return the full html-text to be (parsed and) displayed */ public String createHtmlDocu() { - return getFactory("cfeditor").format("arcDoc.htmlText", typeName, desc != null ? desc.trim() : "", use != null ? use.trim() : ""); + return getFactory("daieditor").format("arcDoc.htmlText", typeName, desc != null ? desc.trim() : "", use != null ? use.trim() : ""); } public CFArchAttrib[] getAttr() { Modified: trunk/daimonin/src/daieditor/CFArchTypeList.java =================================================================== --- trunk/daimonin/src/cfeditor/CFArchTypeList.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,11 +22,11 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.match.ArchObjectMatchers; -import cfeditor.arch.match.NamedArchObjectMatcher; +import daieditor.arch.ArchObject; +import daieditor.arch.match.ArchObjectMatchers; +import daieditor.arch.match.NamedArchObjectMatcher; import java.io.File; import java.io.IOException; import java.util.ArrayList; Modified: trunk/daimonin/src/daieditor/CFJavaEditor.java =================================================================== --- trunk/daimonin/src/cfeditor/CFJavaEditor.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CFJavaEditor.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,9 +22,9 @@ * */ -package cfeditor; +package daieditor; -import static cfeditor.CMainControl.PREFS_LANGUAGE; +import static daieditor.CMainControl.PREFS_LANGUAGE; import java.util.ArrayList; import java.util.List; import java.util.Locale; @@ -50,11 +50,11 @@ * @param args The command line parameters given to the level editor. */ public static void main(final String... args) { - System.setProperty("net.sf.japi.swing.tod", "cfeditor.tod"); + System.setProperty("net.sf.japi.swing.tod", "daieditor.tod"); try { - Logger.getLogger("cfeditor", "cfeditor.action").log(Level.INFO, "build number: " + ResourceBundle.getBundle("build").getString("build.number")); + Logger.getLogger("daieditor", "daieditor.action").log(Level.INFO, "build number: " + ResourceBundle.getBundle("build").getString("build.number")); } catch (final MissingResourceException e) { - Logger.getLogger("cfeditor", "cfeditor.action").log(Level.WARNING, "No build number found:", e); + Logger.getLogger("daieditor", "daieditor.action").log(Level.WARNING, "No build number found:", e); } // Make sure the locale is set before any ActionFactory is used. final String locName = userNodeForPackage(CMainControl.class).get(PREFS_LANGUAGE, null); @@ -62,7 +62,7 @@ Locale.setDefault(new Locale(locName)); } // Now add prefs to the ActionFactory. - ActionFactory.getFactory("cfeditor").addPref(CMainControl.class); + ActionFactory.getFactory("daieditor").addPref(CMainControl.class); final SplashScreen splashScreen = new SplashScreen(); splashScreen.show(); final List<String> infiles = new ArrayList<String>(); // map file names to open initially Modified: trunk/daimonin/src/daieditor/CFTreasureListTree.java =================================================================== --- trunk/daimonin/src/cfeditor/CFTreasureListTree.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CFTreasureListTree.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,11 +22,11 @@ * */ -package cfeditor; +package daieditor; -import static cfeditor.CGUIUtils.getSysIcon; -import cfeditor.arch.ArchObject; -import cfeditor.help.DHelp; +import static daieditor.CGUIUtils.getSysIcon; +import daieditor.arch.ArchObject; +import daieditor.help.DHelp; import java.awt.BorderLayout; import static java.awt.Color.gray; import java.awt.Component; Modified: trunk/daimonin/src/daieditor/CFileInputStream.java =================================================================== --- trunk/daimonin/src/cfeditor/CFileInputStream.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CFileInputStream.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,7 +23,7 @@ * */ -package cfeditor; +package daieditor; import java.io.BufferedInputStream; import java.io.File; Modified: trunk/daimonin/src/daieditor/CFileReader.java =================================================================== --- trunk/daimonin/src/cfeditor/CFileReader.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CFileReader.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,7 +23,7 @@ * */ -package cfeditor; +package daieditor; import java.io.BufferedReader; import java.io.EOFException; Modified: trunk/daimonin/src/daieditor/CGUIUtils.java =================================================================== --- trunk/daimonin/src/cfeditor/CGUIUtils.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CGUIUtils.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,7 +22,7 @@ * */ -package cfeditor; +package daieditor; import java.io.File; import java.net.URL; Modified: trunk/daimonin/src/daieditor/CGridderException.java =================================================================== --- trunk/daimonin/src/cfeditor/CGridderException.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CGridderException.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,7 +22,7 @@ * */ -package cfeditor; +package daieditor; /** * <code>CGridderException</code> class that is used to transfer error messages Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/cfeditor/CMainControl.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,52 +23,52 @@ * */ -package cfeditor; +package daieditor; -import static cfeditor.IGUIConstants.TILE_EDIT_NONE; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectParser; -import cfeditor.arch.ArchObjectStack; -import cfeditor.arch.anim.AnimationObjects; -import cfeditor.arch.face.FaceFacade; -import cfeditor.arch.face.FaceObjects; -import cfeditor.arch.match.MutableOrArchObjectMatcher; -import cfeditor.arch.match.ViewArchObjectMatcherManager; -import cfeditor.gui.HideFileFilterProxy; -import cfeditor.gui.MapFileFilter; -import cfeditor.gui.map.MapCursorControl; -import cfeditor.gui.map.MapPreviewAccessory; -import cfeditor.gui.map.MapPropertiesDialog; -import cfeditor.gui.prefs.AppPrefs; -import cfeditor.gui.prefs.DevPrefs; -import cfeditor.gui.prefs.GUIPrefs; -import cfeditor.gui.prefs.MapValidatorPrefs; -import cfeditor.gui.prefs.MiscPrefs; -import cfeditor.gui.prefs.NetPrefs; -import cfeditor.gui.prefs.ResPrefs; -import cfeditor.gui.prefs.UpdatePrefs; -import cfeditor.map.MapArchObject; -import cfeditor.map.MapControl; -import cfeditor.map.MapModel; -import cfeditor.map.MapModelEvent; -import cfeditor.map.MapModelListener; -import cfeditor.map.MapSquare; -import cfeditor.map.validation.DefaultErrorCollector; -import cfeditor.map.validation.DelegatingMapValidator; -import cfeditor.map.validation.ErrorCollector; -import cfeditor.map.validation.checks.BlockedMobOrSpawnPointChecker; -import cfeditor.map.validation.checks.ConnectedInsideContainerChecker; -import cfeditor.map.validation.checks.ConnectedPickableChecker; -import cfeditor.map.validation.checks.DoubleArchChecker; -import cfeditor.map.validation.checks.DoubleLayerChecker; -import cfeditor.map.validation.checks.EmptySpawnPointChecker; -import cfeditor.map.validation.checks.ExitChecker; -import cfeditor.map.validation.checks.MobOutsideSpawnPointChecker; -import cfeditor.map.validation.checks.SlayingChecker; -import cfeditor.map.validation.checks.SquareWithoutFloorChecker; -import cfeditor.map.validation.checks.SysObjectOnLayerZeroChecker; -import cfeditor.map.validation.checks.TilePathsChecker; -import cfeditor.textedit.scripteditor.ScriptEditControl; +import static daieditor.IGUIConstants.TILE_EDIT_NONE; +import daieditor.arch.ArchObject; +import daieditor.arch.ArchObjectParser; +import daieditor.arch.ArchObjectStack; +import daieditor.arch.anim.AnimationObjects; +import daieditor.arch.face.FaceFacade; +import daieditor.arch.face.FaceObjects; +import daieditor.arch.match.MutableOrArchObjectMatcher; +import daieditor.arch.match.ViewArchObjectMatcherManager; +import daieditor.gui.HideFileFilterProxy; +import daieditor.gui.MapFileFilter; +import daieditor.gui.map.MapCursorControl; +import daieditor.gui.map.MapPreviewAccessory; +import daieditor.gui.map.MapPropertiesDialog; +import daieditor.gui.prefs.AppPrefs; +import daieditor.gui.prefs.DevPrefs; +import daieditor.gui.prefs.GUIPrefs; +import daieditor.gui.prefs.MapValidatorPrefs; +import daieditor.gui.prefs.MiscPrefs; +import daieditor.gui.prefs.NetPrefs; +import daieditor.gui.prefs.ResPrefs; +import daieditor.gui.prefs.UpdatePrefs; +import daieditor.map.MapArchObject; +import daieditor.map.MapControl; +import daieditor.map.MapModel; +import daieditor.map.MapModelEvent; +import daieditor.map.MapModelListener; +import daieditor.map.MapSquare; +import daieditor.map.validation.DefaultErrorCollector; +import daieditor.map.validation.DelegatingMapValidator; +import daieditor.map.validation.ErrorCollector; +import daieditor.map.validation.checks.BlockedMobOrSpawnPointChecker; +import daieditor.map.validation.checks.ConnectedInsideContainerChecker; +import daieditor.map.validation.checks.ConnectedPickableChecker; +import daieditor.map.validation.checks.DoubleArchChecker; +import daieditor.map.validation.checks.DoubleLayerChecker; +import daieditor.map.validation.checks.EmptySpawnPointChecker; +import daieditor.map.validation.checks.ExitChecker; +import daieditor.map.validation.checks.MobOutsideSpawnPointChecker; +import daieditor.map.validation.checks.SlayingChecker; +import daieditor.map.validation.checks.SquareWithoutFloorChecker; +import daieditor.map.validation.checks.SysObjectOnLayerZeroChecker; +import daieditor.map.validation.checks.TilePathsChecker; +import daieditor.textedit.scripteditor.ScriptEditControl; import java.awt.Image; import java.awt.Point; import java.awt.Toolkit; @@ -129,10 +129,10 @@ public final class CMainControl implements ThrowableHandler, MapModelListener { /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** Logger. */ - private static final Logger logger = Logger.getLogger("cfeditor"); + private static final Logger logger = Logger.getLogger("daieditor"); /** Preferences. */ private static final Preferences prefs = userNodeForPackage(CMainControl.class); Modified: trunk/daimonin/src/daieditor/CMainStatusbar.java =================================================================== --- trunk/daimonin/src/cfeditor/CMainStatusbar.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMainStatusbar.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,12 +23,12 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.gui.map.LevelRenderer; -import cfeditor.gui.map.MapCursor; -import cfeditor.gui.map.MapCursorEvent; -import cfeditor.gui.map.MapCursorListener; +import daieditor.gui.map.LevelRenderer; +import daieditor.gui.map.MapCursor; +import daieditor.gui.map.MapCursorEvent; +import daieditor.gui.map.MapCursorListener; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; @@ -60,7 +60,7 @@ private static final long serialVersionUID = 1L; /** The ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** Controller of this statusbar view. */ private final CMainControl mainControl; Modified: trunk/daimonin/src/daieditor/CMainView.java =================================================================== --- trunk/daimonin/src/cfeditor/CMainView.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMainView.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,16 +22,16 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectStack; -import cfeditor.gui.AboutDialog; -import cfeditor.help.DHelp; -import cfeditor.map.MapControl; -import cfeditor.map.validation.ErrorCollector; -import cfeditor.map.validation.ErrorHandler; -import cfeditor.swing.DSplitPane; +import daieditor.arch.ArchObject; +import daieditor.arch.ArchObjectStack; +import daieditor.gui.AboutDialog; +import daieditor.help.DHelp; +import daieditor.map.MapControl; +import daieditor.map.validation.ErrorCollector; +import daieditor.map.validation.ErrorHandler; +import daieditor.swing.DSplitPane; import java.awt.BorderLayout; import java.awt.Point; import java.awt.Rectangle; @@ -75,13 +75,13 @@ public final class CMainView extends JFrame implements ErrorHandler, InternalFrameListener, ThrowableHandler, WindowListener { /** Action Factory to create Actions. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** Serial Version UID. */ private static final long serialVersionUID = 1L; /** Logger. */ - private static final Logger logger = Logger.getLogger("cfeditor"); + private static final Logger logger = Logger.getLogger("daieditor"); /** Preferences. */ private static final Preferences prefs = userNodeForPackage(CMainControl.class); Modified: trunk/daimonin/src/daieditor/CMapArchPanel.java =================================================================== --- trunk/daimonin/src/cfeditor/CMapArchPanel.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMapArchPanel.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,15 +22,15 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectParser; -import cfeditor.gui.ConnectionView; -import cfeditor.gui.ErrorListView; -import cfeditor.map.validation.ErrorCollector; -import cfeditor.map.validation.ErrorHandler; -import cfeditor.swing.DSplitPane; +import daieditor.arch.ArchObject; +import daieditor.arch.ArchObjectParser; +import daieditor.gui.ConnectionView; +import daieditor.gui.ErrorListView; +import daieditor.map.validation.ErrorCollector; +import daieditor.map.validation.ErrorHandler; +import daieditor.swing.DSplitPane; import java.awt.BorderLayout; import static java.awt.Color.black; import static java.awt.Color.blue; @@ -84,7 +84,7 @@ private static final long serialVersionUID = 1L; /** The ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); // constants for the 'task' parameter in editScriptWanted() public static final int SCRIPT_OPEN = 0; Modified: trunk/daimonin/src/daieditor/CMapFileDecode.java =================================================================== --- trunk/daimonin/src/cfeditor/CMapFileDecode.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMapFileDecode.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,10 +22,10 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.map.MapArchObject; +import daieditor.arch.ArchObject; +import daieditor.map.MapArchObject; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; Modified: trunk/daimonin/src/daieditor/CMapFileEncode.java =================================================================== --- trunk/daimonin/src/cfeditor/CMapFileEncode.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMapFileEncode.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,12 +22,12 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.map.MapArchObject; -import cfeditor.map.MapModel; -import cfeditor.map.MapSquare; +import daieditor.arch.ArchObject; +import daieditor.map.MapArchObject; +import daieditor.map.MapModel; +import daieditor.map.MapSquare; import java.awt.Dimension; import java.awt.Point; import java.io.BufferedWriter; Modified: trunk/daimonin/src/daieditor/CMapTileList.java =================================================================== --- trunk/daimonin/src/cfeditor/CMapTileList.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMapTileList.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,13 +23,13 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.gui.map.MapCursorEvent; -import cfeditor.gui.map.MapCursorListener; -import cfeditor.map.MapControl; -import cfeditor.map.MapSquare; +import daieditor.arch.ArchObject; +import daieditor.gui.map.MapCursorEvent; +import daieditor.gui.map.MapCursorListener; +import daieditor.map.MapControl; +import daieditor.map.MapSquare; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -66,7 +66,7 @@ private static final long serialVersionUID = 1L; /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** Controller of this subview. */ private final CMainControl mainControl; Modified: trunk/daimonin/src/daieditor/CMapViewBasic.java =================================================================== --- trunk/daimonin/src/cfeditor/CMapViewBasic.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMapViewBasic.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,23 +22,23 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.gui.map.LevelRenderer; -import cfeditor.gui.map.MapCursor; -import cfeditor.gui.map.MapCursorEvent; -import cfeditor.gui.map.MapCursorListener; -import cfeditor.gui.map.MapGrid; -import cfeditor.gui.map.MapUserListener; -import cfeditor.map.MapControl; -import cfeditor.map.MapModel; -import cfeditor.map.MapModelEvent; -import cfeditor.map.MapModelListener; -import cfeditor.map.MapSquare; -import cfeditor.map.validation.ErrorCollector; -import cfeditor.map.validation.ErrorHandler; -import cfeditor.map.validation.ValidationError; +import daieditor.arch.ArchObject; +import daieditor.gui.map.LevelRenderer; +import daieditor.gui.map.MapCursor; +import daieditor.gui.map.MapCursorEvent; +import daieditor.gui.map.MapCursorListener; +import daieditor.gui.map.MapGrid; +import daieditor.gui.map.MapUserListener; +import daieditor.map.MapControl; +import daieditor.map.MapModel; +import daieditor.map.MapModelEvent; +import daieditor.map.MapModelListener; +import daieditor.map.MapSquare; +import daieditor.map.validation.ErrorCollector; +import daieditor.map.validation.ErrorHandler; +import daieditor.map.validation.ValidationError; import java.awt.Dimension; import java.awt.Point; import java.awt.Rectangle; Modified: trunk/daimonin/src/daieditor/CMapViewIFrame.java =================================================================== --- trunk/daimonin/src/cfeditor/CMapViewIFrame.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMapViewIFrame.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,9 +22,9 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.map.MapControl; +import daieditor.map.MapControl; import java.awt.BorderLayout; import java.awt.Image; import java.awt.Point; Modified: trunk/daimonin/src/daieditor/CMapViewInterface.java =================================================================== --- trunk/daimonin/src/cfeditor/CMapViewInterface.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CMapViewInterface.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,7 +22,7 @@ * */ -package cfeditor; +package daieditor; /** * A mapview consists of two classes: The CMapViewBasic instance which Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/cfeditor/CNewMapDialog.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,11 +23,11 @@ * */ -package cfeditor; +package daieditor; -import static cfeditor.CMainControl.PREFS_USERNAME; -import static cfeditor.CMainControl.PREFS_USERNAME_DEFAULT; -import cfeditor.map.MapArchObject; +import static daieditor.CMainControl.PREFS_USERNAME; +import static daieditor.CMainControl.PREFS_USERNAME_DEFAULT; +import daieditor.map.MapArchObject; import java.awt.Component; import java.awt.FlowLayout; import java.awt.GridLayout; @@ -63,7 +63,7 @@ private static final long serialVersionUID = 1L; /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** Map types. */ public enum MapType { Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/cfeditor/CPickmapPanel.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,12 +22,12 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.arch.ArchObjectParser; -import cfeditor.map.MapArchObject; -import cfeditor.map.MapControl; +import daieditor.arch.ArchObject; +import daieditor.arch.ArchObjectParser; +import daieditor.map.MapArchObject; +import daieditor.map.MapControl; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; @@ -47,7 +47,7 @@ public final class CPickmapPanel { /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** static instance of this class */ private static CPickmapPanel instance; Modified: trunk/daimonin/src/daieditor/CPreview.java =================================================================== --- trunk/daimonin/src/cfeditor/CPreview.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CPreview.java 2006-05-25 23:33:50 UTC (rev 19) @@ -24,7 +24,7 @@ * */ -package cfeditor; +package daieditor; import java.awt.Color; import java.awt.Dimension; @@ -59,7 +59,7 @@ private static final long serialVersionUID = 1L; /** Action Factory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** Original image. */ private final Image original; Modified: trunk/daimonin/src/daieditor/CUndoStack.java =================================================================== --- trunk/daimonin/src/cfeditor/CUndoStack.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CUndoStack.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,9 +22,9 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.map.MapControl; +import daieditor.map.MapControl; import java.util.ArrayList; import java.util.List; import java.util.Map; Modified: trunk/daimonin/src/daieditor/CopyBuffer.java =================================================================== --- trunk/daimonin/src/cfeditor/CopyBuffer.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/CopyBuffer.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,14 +22,14 @@ * */ -package cfeditor; +package daieditor; -import static cfeditor.CMainControl.rnd; -import cfeditor.arch.ArchObject; -import cfeditor.map.MapArchObject; -import cfeditor.map.MapControl; -import cfeditor.map.MapModel; -import cfeditor.map.MapSquare; +import static daieditor.CMainControl.rnd; +import daieditor.arch.ArchObject; +import daieditor.map.MapArchObject; +import daieditor.map.MapControl; +import daieditor.map.MapModel; +import daieditor.map.MapSquare; import java.awt.Dimension; import java.awt.Point; import java.awt.Rectangle; Modified: trunk/daimonin/src/daieditor/IGUIConstants.java =================================================================== --- trunk/daimonin/src/cfeditor/IGUIConstants.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/IGUIConstants.java 2006-05-25 23:33:50 UTC (rev 19) @@ -21,7 +21,7 @@ * */ -package cfeditor; +package daieditor; import java.awt.Color; import java.awt.Insets; @@ -77,7 +77,7 @@ String APP_NAME = "DaimoninEditor BETA3 v0.966"; // application name String APP_WINDOW_TITLE = "Daimonin Map & Arch Editor"; // application main window title - String APP_SETTINGS_DIR = ".cfeditor"; // name of directory with settings file + String APP_SETTINGS_DIR = ".daieditor"; // name of directory with settings file /** * The height of rigid area between the two tab-panes on Modified: trunk/daimonin/src/daieditor/IUndoable.java =================================================================== --- trunk/daimonin/src/cfeditor/IUndoable.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/IUndoable.java 2006-05-25 23:33:50 UTC (rev 19) @@ -21,7 +21,7 @@ * 02111-1307, USA. * */ -package cfeditor; +package daieditor; /** * A generic interface for undoable/redoable operations. Modified: trunk/daimonin/src/daieditor/MapTilePane.java =================================================================== --- trunk/daimonin/src/cfeditor/MapTilePane.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/MapTilePane.java 2006-05-25 23:33:50 UTC (rev 19) @@ -21,11 +21,11 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.gui.DirectionLayout; -import cfeditor.map.MapArchObject; -import cfeditor.map.MapControl; +import daieditor.gui.DirectionLayout; +import daieditor.map.MapArchObject; +import daieditor.map.MapControl; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; @@ -69,7 +69,7 @@ private static final long serialVersionUID = 1L; /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** The mainControl to use. */ private final CMainControl mainControl; Modified: trunk/daimonin/src/daieditor/MultiArchData.java =================================================================== --- trunk/daimonin/src/cfeditor/MultiArchData.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/MultiArchData.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,9 +22,9 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; +import daieditor.arch.ArchObject; import java.util.ArrayList; import java.util.List; import org.jetbrains.annotations.Nullable; @@ -201,4 +201,4 @@ head = node; } -} // class MultiArchData \ No newline at end of file +} // class MultiArchData Modified: trunk/daimonin/src/daieditor/MultiPositionData.java =================================================================== --- trunk/daimonin/src/cfeditor/MultiPositionData.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/MultiPositionData.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,7 +22,7 @@ * */ -package cfeditor; +package daieditor; import java.awt.Dimension; import java.awt.Point; Modified: trunk/daimonin/src/daieditor/PathManager.java =================================================================== --- trunk/daimonin/src/cfeditor/PathManager.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/PathManager.java 2006-05-25 23:33:50 UTC (rev 19) @@ -19,7 +19,7 @@ * */ -package cfeditor; +package daieditor; import java.io.File; import java.io.IOException; Modified: trunk/daimonin/src/daieditor/ProcessRunner.java =================================================================== --- trunk/daimonin/src/cfeditor/ProcessRunner.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/ProcessRunner.java 2006-05-25 23:33:50 UTC (rev 19) @@ -21,7 +21,7 @@ * */ -package cfeditor; +package daieditor; import java.awt.BorderLayout; import static java.awt.BorderLayout.CENTER; @@ -55,7 +55,7 @@ private static final long serialVersionUID = 1L; /** Action Factory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** The Dialog. * @serial include Modified: trunk/daimonin/src/daieditor/ReplaceDialog.java =================================================================== --- trunk/daimonin/src/cfeditor/ReplaceDialog.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,11 +23,11 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.map.MapControl; -import cfeditor.map.MapSquare; +import daieditor.arch.ArchObject; +import daieditor.map.MapControl; +import daieditor.map.MapSquare; import java.awt.FlowLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -57,7 +57,7 @@ private static final long serialVersionUID = 1L; /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); // matching criteria public static final int MATCH_ARCH_NAME = 0; Modified: trunk/daimonin/src/daieditor/ResourceFileManager.java =================================================================== --- trunk/daimonin/src/cfeditor/ResourceFileManager.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/ResourceFileManager.java 2006-05-25 23:33:50 UTC (rev 19) @@ -1,4 +1,4 @@ -package cfeditor; +package daieditor; /** * TODO Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/cfeditor/ScriptArchData.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,10 +22,10 @@ * */ -package cfeditor; +package daieditor; -import cfeditor.arch.ArchObject; -import cfeditor.textedit.scripteditor.ScriptEditControl; +import daieditor.arch.ArchObject; +import daieditor.textedit.scripteditor.ScriptEditControl; import java.awt.Color; import java.awt.FlowLayout; import java.awt.Insets; @@ -59,7 +59,7 @@ public final class ScriptArchData { /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); // popup frame to edit script paths: private static JDialog pathFrame; Modified: trunk/daimonin/src/daieditor/Spells.java =================================================================== --- trunk/daimonin/src/cfeditor/Spells.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/Spells.java 2006-05-25 23:33:50 UTC (rev 19) @@ -19,7 +19,7 @@ * */ -package cfeditor; +package daieditor; import java.io.BufferedReader; import java.io.EOFException; @@ -53,7 +53,7 @@ public class Spells { /** ActionFactory. */ - private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("daieditor"); private String[] spellNames; // array of spell names (these all begin with a ' ' space!) private int[] spellNumbers; // array of spell numbers Modified: trunk/daimonin/src/daieditor/SplashScreen.java =================================================================== --- trunk/daimonin/src/cfeditor/SplashScreen.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/SplashScreen.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,7 +22,7 @@ * */ -package cfeditor; +package daieditor; import static java.awt.BorderLayout.SOUTH; import static java.awt.Color.BLACK; Modified: trunk/daimonin/src/daieditor/Updater.java =================================================================== --- trunk/daimonin/src/cfeditor/Updater.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/Updater.java 2006-05-25 23:33:50 UTC (rev 19) @@ -19,7 +19,7 @@ * */ -package cfeditor; +package daieditor; import java.awt.Component; import java.io.File; @@ -54,7 +54,7 @@ public final class Updater implements Runnable { /** ActionFactory. */ - private static final ActionFactory actionFactory = ActionFactory.getFactory("cfeditor"); + private static final ActionFactory actionFactory = ActionFactory.getFactory("daieditor"); /** Preferences. */ private static final Preferences prefs = userNodeForPackage(CMainControl.class); Modified: trunk/daimonin/src/daieditor/arch/ArchAttribType.java =================================================================== --- trunk/daimonin/src/cfeditor/arch/ArchAttribType.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/arch/ArchAttribType.java 2006-05-25 23:33:50 UTC (rev 19) @@ -19,7 +19,7 @@ * */ -package cfeditor.arch; +package daieditor.arch; /** Enumeration for Archetype Attribute Types. * @author <a href="mailto:Chr...@it...">Christian Hujer</a> Modified: trunk/daimonin/src/daieditor/arch/ArchObject.java =================================================================== --- trunk/daimonin/src/cfeditor/arch/ArchObject.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/arch/ArchObject.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,19 +23,19 @@ * */ -package cfeditor.arch; +package daieditor.arch; -import cfeditor.CFArchType; -import cfeditor.CFArchTypeList; -import cfeditor.CMainControl; -import cfeditor.CMapArchPanel; -import cfeditor.IGUIConstants; -import cfeditor.MultiArchData; -import cfeditor.ScriptArchData; -import cfeditor.arch.anim.AnimationObject; -import cfeditor.arch.anim.AnimationObjects; -import cfeditor.arch.face.FaceObject; -import cfeditor.map.MapSquare; +import daieditor.CFArchType; +import daieditor.CFArchTypeList; +import daieditor.CMainControl; +import daieditor.CMapArchPanel; +import daieditor.IGUIConstants; +import daieditor.MultiArchData; +import daieditor.ScriptArchData; +import daieditor.arch.anim.AnimationObject; +import daieditor.arch.anim.AnimationObjects; +import daieditor.arch.face.FaceObject; +import daieditor.map.MapSquare; import java.lang.ref.SoftReference; import java.util.ArrayList; import java.util.List; Modified: trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java =================================================================== --- trunk/daimonin/src/cfeditor/arch/ArchObjectContainer.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/arch/ArchObjectContainer.java 2006-05-25 23:33:50 UTC (rev 19) @@ -19,16 +19,16 @@ * */ -package cfeditor.arch; +package daieditor.arch; -import cfeditor.map.MapSquare; +import daieditor.map.MapSquare; import java.util.Iterator; /** Base class for classes that match contain ArchObjects as children. * The interface serves 2 main purposes: * <ul> * <li>{@link ArchObject} extends this class for containing other arches, like bag contents or attached events.</li> - * <li>{@link cfeditor.map.MapSquare} extends this class to list the tiles on a MapSquare.</li> + * <li>{@link daieditor.map.MapSquare} extends this class to list the tiles on a MapSquare.</li> * </ul> * @author <a href="mailto:Chr...@it...">Christian Hujer</a> */ Modified: trunk/daimonin/src/daieditor/arch/ArchObjectIterator.java =================================================================== --- trunk/daimonin/src/cfeditor/arch/ArchObjectIterator.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/arch/ArchObjectIterator.java 2006-05-25 23:33:50 UTC (rev 19) @@ -22,7 +22,7 @@ * */ -package cfeditor.arch; +package daieditor.arch; import java.util.Iterator; import java.util.NoSuchElementException; Modified: trunk/daimonin/src/daieditor/arch/ArchObjectParser.java =================================================================== --- trunk/daimonin/src/cfeditor/arch/ArchObjectParser.java 2006-05-25 23:20:20 UTC (rev 18) +++ trunk/daimonin/src/daieditor/arch/ArchObjectParser.java 2006-05-25 23:33:50 UTC (rev 19) @@ -23,13 +23,13 @@ * */ -package cfeditor.arch; +package daieditor.arch; -import cfeditor.CMainControl; -import cfeditor.IGUIConstants; -import cfeditor.MultiPositionData; -import cfeditor.PathManager; -import cfeditor.arch.anim.DuplicateAnimationException; +import daieditor.CMainControl; +import daieditor.IGUIConstants; +import daieditor.MultiPositionData; +import daieditor.PathManager; +import daieditor.arch.anim.DuplicateAnimationException; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; @@ -52,7 +52,7 @@ public final class ArchObjectParser { /** Logger. */ - private static final Logger logger = Logger.getLogger("cfeditor"); + p... [truncated message content] |
From: <chr...@us...> - 2006-05-25 23:20:30
|
Revision: 18 Author: christianhujer Date: 2006-05-25 16:20:20 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=18&view=rev Log Message: ----------- Refactored AnimationObject. Modified Paths: -------------- trunk/crossfire/src/cfeditor/AnimationObject.java trunk/crossfire/src/cfeditor/ArchObjectStack.java trunk/crossfire/src/cfeditor/CMainControl.java Added Paths: ----------- trunk/crossfire/src/cfeditor/AnimationObjects.java Modified: trunk/crossfire/src/cfeditor/AnimationObject.java =================================================================== --- trunk/crossfire/src/cfeditor/AnimationObject.java 2006-05-25 23:18:30 UTC (rev 17) +++ trunk/crossfire/src/cfeditor/AnimationObject.java 2006-05-25 23:20:20 UTC (rev 18) @@ -25,73 +25,58 @@ package cfeditor; -import java.util.HashMap; -import java.util.Map; - /** - * The <code>AnimationObject</code> - * - * @author <a href="mailto:mic...@no...">Michael Toennies</a> + * A single animation object. */ public class AnimationObject { - private final AnimObjectNode[] animObjects = new AnimObjectNode[10000]; + /** The name of this animation. */ + private final String animName; - private final String[] nameTable = new String[10000]; + /** The animation list of this animation. + * The individual entries are all postfixed with '\n'. + */ + private final String animList; - // The hash tables hold the name and the index for the field - // if one can show me, that storing and accessing names AND objects - // in the table is faster than in the static arrays, we can change this - private final Map<String,Integer> animHashTable = new HashMap<String,Integer>(); - - private int animObjCount; - - public AnimationObject() { - animObjCount = 0; - + /** + * Create an Animation Object. + * @param animName name of the animation + * @param animList list with frames + */ + public AnimationObject(final String animName, final String animList) { + this.animList = animList; + this.animName = animName; } - public void addAnimObject(final String name, final String list) { - animObjects[animObjCount] = new AnimObjectNode(name, list); - nameTable[animObjCount] = name; - animHashTable.put(name, animObjCount); // put it in list - - animObjCount++; + /** + * Returns the animation list of this animation. + * The individual entries are all postfixed with '\n'. + * @return the animation list of this animation. + */ + public String getAnimList() { + return animList; } - public String[] nameStringTable() { - return nameTable; + /** + * Returns the name of this animation. + * @return the name of this animation. + */ + public String getAnimName() { + return animName; } - public String getNameString(final int i) { - return nameTable[i]; + /** + * {@inheritDoc} + * The String representation of an AnimObjectNode is suitable for writing into the animations file. + */ + @Override public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("anim "); + sb.append(animName); + sb.append('\n'); + sb.append(animList); + sb.append("mina\n"); + return sb.toString(); } - public int getAnimObjectCounter() { - return animObjCount; - } - - public String getAnimObjectList(final int i) { - return animObjects[i].animList; - } - - public String getAnimObjectName(final int i) { - return animObjects[i].animName; - } - - public int findAnimObject(final String name) { - return animHashTable.get(name); - } - - - private static class AnimObjectNode { - private final String animName; - private final String animList; // A List of "\n" connected strings - - AnimObjectNode (final String animName, final String animList) { - this.animList = animList; - this.animName = animName; - } - } // End of class - } // End of class Added: trunk/crossfire/src/cfeditor/AnimationObjects.java =================================================================== --- trunk/crossfire/src/cfeditor/AnimationObjects.java (rev 0) +++ trunk/crossfire/src/cfeditor/AnimationObjects.java 2006-05-25 23:20:20 UTC (rev 18) @@ -0,0 +1,75 @@ +/* + * Crossfire Java Editor. + * Copyright (C) 2000 Michael Toennies + * Copyright (C) 2001 Andreas Vogl + * Copyright (C) 2006 The Gridarta Developers + * + * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) + * + * 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 cfeditor; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.TreeSet; + +/** + * The <code>AnimationObject</code>. + * + * WARNING: This class uses two indexes which are independent of each other: index of animation object and index of animation name. + * + * @author <a href="mailto:mic...@no...">Michael Toennies</a> + */ +public class AnimationObjects implements Iterable<AnimationObject> { + + /** The animation objects. */ + private final List<AnimationObject> animObjects = new ArrayList<AnimationObject>(); + + /** Number of animation objects created. */ + private int numAnimObjects; + + /** Create the AnimationObject container. */ + public AnimationObjects() { + } + + /** {@inheritDoc} */ + public Iterator<AnimationObject> iterator() { + return new TreeSet<AnimationObject>(animObjects).iterator(); + } + + /** + * Add an animation object. + * @param name name of the animation object + * @param list list with individual frames + */ + public void addAnimObject(final String name, final String list) { + animObjects.add(new AnimationObject(name, list)); + numAnimObjects++; + } + + /** + * Returns number of animation objects created. + * @return number of animation objects created. + */ + public int getNumAnimObjects() { + return numAnimObjects; + } + +} // End of class Property changes on: trunk/crossfire/src/cfeditor/AnimationObjects.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: trunk/crossfire/src/cfeditor/ArchObjectStack.java =================================================================== --- trunk/crossfire/src/cfeditor/ArchObjectStack.java 2006-05-25 23:18:30 UTC (rev 17) +++ trunk/crossfire/src/cfeditor/ArchObjectStack.java 2006-05-25 23:20:20 UTC (rev 18) @@ -2,6 +2,7 @@ * Crossfire Java Editor. * Copyright (C) 2000 Michael Toennies * Copyright (C) 2001 Andreas Vogl + * Copyright (C) 2006 The Gridarta Developers * * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) * @@ -38,7 +39,6 @@ import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; -import java.util.Arrays; import java.util.Date; import java.util.Hashtable; import javax.swing.BorderFactory; @@ -1349,16 +1349,13 @@ DataOutputStream binFile = new DataOutputStream( new BufferedOutputStream(new FileOutputStream(m_control.getArchDefaultFolder()+File.separator+"animations"))); - int count_ani = m_control.getAnimationObject().getAnimObjectCounter(); + final AnimationObjects animObjects = m_control.getAnimationObject(); + int count_ani = animObjects.getNumAnimObjects(); // sort it... pbar.setLabel("Collecting Animations...", 0, count_ani); - Arrays.sort(m_control.getAnimationObject().nameStringTable(), 0, count_ani); - for (int i = 0; i < count_ani; i++) { - nr = m_control.getAnimationObject().findAnimObject(m_control.getAnimationObject().getNameString(i)); - binFile.writeBytes("anim "+m_control.getAnimationObject().getAnimObjectName(nr)+"\n"); - binFile.writeBytes(m_control.getAnimationObject().getAnimObjectList(nr)); - binFile.writeBytes("mina\n"); + for (final AnimationObject node : animObjects) { + binFile.writeBytes(node.toString()); if (count_ani%10 == 0) { pbar.setValue(count_ani); } Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-25 23:18:30 UTC (rev 17) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-25 23:20:20 UTC (rev 18) @@ -80,7 +80,7 @@ private CMapFileEncode mapFileEncoder; private ArchObjectParser archObjectParser; - private AnimationObject animationObject; + private AnimationObjects animationObjects; // icons for the map and arch pictures . X= rectangle, normal = iso private ImageIcon mapSelIcon; @@ -233,7 +233,7 @@ // our global object parser archObjectParser = new ArchObjectParser(this); - animationObject = new AnimationObject(); + animationObjects = new AnimationObjects(); // read in the type & type field definitions archObjectParser.loadTypeNumbers(); @@ -1939,8 +1939,8 @@ return archObjectParser; } - public AnimationObject getAnimationObject() { - return animationObject; + public AnimationObjects getAnimationObject() { + return animationObjects; } public String getImageSet() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 23:18:37
|
Revision: 17 Author: christianhujer Date: 2006-05-25 16:18:30 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=17&view=rev Log Message: ----------- Added missing deprecation annotation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFancyButton.java Modified: trunk/crossfire/src/cfeditor/CFancyButton.java =================================================================== --- trunk/crossfire/src/cfeditor/CFancyButton.java 2006-05-25 21:16:38 UTC (rev 16) +++ trunk/crossfire/src/cfeditor/CFancyButton.java 2006-05-25 23:18:30 UTC (rev 17) @@ -34,7 +34,7 @@ * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @deprecated Don't use this anymore. */ -public class CFancyButton extends JButton { +@Deprecated public class CFancyButton extends JButton { private ImageIcon normalIcon; private ImageIcon rolloverIcon; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 21:16:48
|
Revision: 16 Author: christianhujer Date: 2006-05-25 14:16:38 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=16&view=rev Log Message: ----------- Updated README, added MAINTAINERS Modified Paths: -------------- trunk/README Added Paths: ----------- trunk/MAINTAINERS Added: trunk/MAINTAINERS =================================================================== --- trunk/MAINTAINERS (rev 0) +++ trunk/MAINTAINERS 2006-05-25 21:16:38 UTC (rev 16) @@ -0,0 +1,6 @@ +The current maintainers of Gridarta are: + +* Christian Hujer <ch...@ri...> +* Daniel Viegas <der...@us...> +* Andreas Kirschbaum <aki...@us...> +* Anja Heim <z0...@us...> Property changes on: trunk/MAINTAINERS ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: trunk/README =================================================================== --- trunk/README 2006-05-25 20:57:05 UTC (rev 15) +++ trunk/README 2006-05-25 21:16:38 UTC (rev 16) @@ -53,8 +53,14 @@ libraries. CREDITS - List of project contributors. + List of project contributors. See also MAINTAINERS. +crossfire/ + Legacy directory containing the old Crossfire Map Editor. + +daimonin/ + Legacy directory containing the old Daimonin Map Editor. + dest/ (generated) The directory containing generated files. @@ -66,6 +72,9 @@ dist/ (generated) Generated directory containing distribution archives. +INSTALL + Description of how to build and install Gridarta. + lib/ Directory containing third part libraries used to build Gridarta. Please note that these third party libraries have their own license conditions. The @@ -74,9 +83,18 @@ 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. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 20:57:15
|
Revision: 15 Author: christianhujer Date: 2006-05-25 13:57:05 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=15&view=rev Log Message: ----------- Removed official crossfire+ support. Modified Paths: -------------- trunk/README Modified: trunk/README =================================================================== --- trunk/README 2006-05-25 19:25:13 UTC (rev 14) +++ trunk/README 2006-05-25 20:57:05 UTC (rev 15) @@ -24,7 +24,6 @@ The current target applications are: * Angelion http://angelion.sric.com/ * Crossfire http://crossfire.real-time.com/ -* Crossfire+ http://crossfire.schmorp.de/ * Daimonin http://www.daimonin.net/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 19:25:19
|
Revision: 14 Author: christianhujer Date: 2006-05-25 12:25:13 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=14&view=rev Log Message: ----------- Removed crossfire+ from announced support. Modified Paths: -------------- trunk/src/doc/start.xhtml Modified: trunk/src/doc/start.xhtml =================================================================== --- trunk/src/doc/start.xhtml 2006-05-25 19:24:27 UTC (rev 13) +++ trunk/src/doc/start.xhtml 2006-05-25 19:25:13 UTC (rev 14) @@ -6,7 +6,7 @@ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta name="Date" content="$Date: 2006-04-18 03:01:25 +0200 (Die, 18 Apr 2006) $" /> <meta name="keywords" content="Gridarta, Map Editor, MMORPG, Angelion, Crossfire, Daimonin" /> - <meta name="description" content="Gridarta is a Map Editor for 2D MMORPGs, namely Angelion, Crossfire, Crossfire+ and Daimonin." /> + <meta name="description" content="Gridarta is a Map Editor for 2D MMORPGs, namely Angelion, Crossfire, and Daimonin." /> <link rel="alternate" type="application/rss+xml" title="Project news releases" href="http://sourceforge.net/export/rss2_projnews.php?group_id=166996" /> <link rel="alternate" type="application/rss+xml" title="Project news releases (including full text of news items)" href="http://sourceforge.net/export/rss2_projnews.php?group_id=166996&rss_fulltext=1" /> <link rel="alternate" type="application/rss+xml" title="Project file releases" href="http://sourceforge.net/export/rss2_projfiles.php?group_id=166996" /> @@ -21,7 +21,7 @@ <h2>What is Gridarta?</h2> <p> Gridarta is an open source (GPL) Map Editor for 2D MMORPGs. - Gridarta currently supports Angelion, Crossfire, Crossfire+ and Daimonin. + Gridarta currently supports Angelion, Crossfire and Daimonin. </p> <h2>News</h2> <p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 19:24:38
|
Revision: 13 Author: christianhujer Date: 2006-05-25 12:24:27 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=13&view=rev Log Message: ----------- Minor refactorings. Modified Paths: -------------- trunk/crossfire/src/cfeditor/AnimationObject.java trunk/crossfire/src/cfeditor/CFancyButton.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainToolbar.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/ExitTypes.java trunk/crossfire/src/cfeditor/JarResources.java Modified: trunk/crossfire/src/cfeditor/AnimationObject.java =================================================================== --- trunk/crossfire/src/cfeditor/AnimationObject.java 2006-05-25 18:09:23 UTC (rev 12) +++ trunk/crossfire/src/cfeditor/AnimationObject.java 2006-05-25 19:24:27 UTC (rev 13) @@ -2,6 +2,7 @@ * Crossfire Java Editor. * Copyright (C) 2000 Michael Toennies * Copyright (C) 2001 Andreas Vogl + * Copyright (C) 2006 The Gridarta Developers * * (code based on: Gridder. 2D grid based level editor. (C) 2000 Pasi Keränen) * @@ -24,7 +25,8 @@ package cfeditor; -import java.util.Hashtable; +import java.util.HashMap; +import java.util.Map; /** * The <code>AnimationObject</code> @@ -40,24 +42,19 @@ // The hash tables hold the name and the index for the field // if one can show me, that storing and accessing names AND objects // in the table is faster than in the static arrays, we can change this - private static final Hashtable animHashTable = new Hashtable(); + private final Map<String,Integer> animHashTable = new HashMap<String,Integer>(); private int animObjCount; - private final CMainControl m_control; - - public AnimationObject(CMainControl control) { - m_control = control; + public AnimationObject() { animObjCount = 0; } - public void addAnimObject(String name, String list) { - animObjects[animObjCount] = new AnimObjectNode(); - animObjects[animObjCount].animName = new String(name); - animObjects[animObjCount].animList = new String(list); - nameTable[animObjCount] = new String(name); - animHashTable.put(name, new Integer(animObjCount)); // put it in list + public void addAnimObject(final String name, final String list) { + animObjects[animObjCount] = new AnimObjectNode(name, list); + nameTable[animObjCount] = name; + animHashTable.put(name, animObjCount); // put it in list animObjCount++; } @@ -66,7 +63,7 @@ return nameTable; } - public String getNameString(int i) { + public String getNameString(final int i) { return nameTable[i]; } @@ -74,26 +71,27 @@ return animObjCount; } - public String getAnimObjectList(int i) { + public String getAnimObjectList(final int i) { return animObjects[i].animList; } - public String getAnimObjectName(int i) { + public String getAnimObjectName(final int i) { return animObjects[i].animName; } - public int findAnimObject(String name) { - Integer num = (Integer)animHashTable.get(name); - return num.intValue(); + public int findAnimObject(final String name) { + return animHashTable.get(name); } -} // End of class -class AnimObjectNode { - String animName; - String animList; // A List of "\n" connected strings - public AnimObjectNode () { - animName = null; - animList = null; - } + private static class AnimObjectNode { + private final String animName; + private final String animList; // A List of "\n" connected strings + + AnimObjectNode (final String animName, final String animList) { + this.animList = animList; + this.animName = animName; + } + } // End of class + } // End of class Modified: trunk/crossfire/src/cfeditor/CFancyButton.java =================================================================== --- trunk/crossfire/src/cfeditor/CFancyButton.java 2006-05-25 18:09:23 UTC (rev 12) +++ trunk/crossfire/src/cfeditor/CFancyButton.java 2006-05-25 19:24:27 UTC (rev 13) @@ -26,152 +26,72 @@ import java.awt.Insets; import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; import javax.swing.ImageIcon; import javax.swing.JButton; -import javax.swing.UIManager; -/** - * <code>CFancyButton</code> implements fancy button that has a cool rollover - * effect enabled under Windows l'n'f. +/** A JButton subclass. * * @author <a href="mailto:mic...@no...">Michael Toennies</a> + * @deprecated Don't use this anymore. */ public class CFancyButton extends JButton { - private ImageIcon m_normalIcon; - private ImageIcon m_rolloverIcon; - private boolean m_fMouseOver = false; - private boolean m_fWindowsLNF = false; + private ImageIcon normalIcon; + private ImageIcon rolloverIcon; private static final long serialVersionUID = -6830925679283342190L; - static MouseListener mStatic_rolloverListener = new MouseListener() { - public void mouseClicked(MouseEvent event) { - } - - public void mousePressed(MouseEvent event) { - } - - public void mouseReleased(MouseEvent event) { - } - - public void mouseEntered(MouseEvent event) { - CFancyButton button = (CFancyButton)event.getSource(); - button.m_fMouseOver = true; - - if (button.m_rolloverIcon != null) { - button.setIcon(button.m_rolloverIcon); - } - - if (button.m_fWindowsLNF) { - button.setBorderPainted(button.isEnabled()); - } - } - - public void mouseExited(MouseEvent event) { - CFancyButton button = (CFancyButton)event.getSource(); - - button.m_fMouseOver = false; - - if (button.m_normalIcon != null) { - button.setIcon(button.m_normalIcon); - } - - if (button.m_fWindowsLNF) { - button.setBorderPainted(false); - } - } - }; - - public CFancyButton(String strLabel, ActionListener actionListener) { + public CFancyButton(final String strLabel, final ActionListener actionListener) { this(strLabel, null, null, actionListener); } - public CFancyButton( - String strLabel, - String strToolTip, - ActionListener actionListener) { - this(strLabel, strToolTip, null, actionListener); + public CFancyButton(final String label, final String toolTip, final ActionListener actionListener) { + this(label, toolTip, null, actionListener); } - public CFancyButton( - String strLabel, - String strToolTip, - String strIcon, - ActionListener actionListener) { - super(strLabel); - if (strToolTip != null) { - setToolTipText(strToolTip); + public CFancyButton(final String label, final String toolTip, final String icon, final ActionListener actionListener) { + super(label); + if (toolTip != null) { + setToolTipText(toolTip); } - - if (strIcon != null) { - m_rolloverIcon = CGUIUtils.getIcon(strIcon); - setFancyIcon(m_rolloverIcon); + if (icon != null) { + rolloverIcon = CGUIUtils.getIcon(icon); + setFancyIcon(rolloverIcon); } - if (actionListener != null) { addActionListener(actionListener); } else { setEnabled(false); } - - Insets insets = getInsets(); - insets.top = 2; - insets.left = insets.top; - insets.right = insets.top; - insets.bottom = insets.top; - this.setMargin(insets); - - m_fWindowsLNF = UIManager.getLookAndFeel().getID().compareToIgnoreCase("Windows") == 0; - - addMouseListener(mStatic_rolloverListener); - - if (m_fWindowsLNF) { - setBorderPainted(m_fMouseOver); - } + setMargin(new Insets(2, 2, 2, 2)); } /** * Sets the fancy icon (automatically calculates the grayscaled normal icon) * @param icon the icon to be used as the rollover icon. */ - public void setFancyIcon(ImageIcon icon) { - m_rolloverIcon = icon; - - if (m_rolloverIcon != null) { - m_normalIcon = CGUIUtils.getGrayScaled(m_rolloverIcon); + public void setFancyIcon(final ImageIcon icon) { + rolloverIcon = icon; + if (rolloverIcon != null) { + normalIcon = CGUIUtils.getGrayScaled(rolloverIcon); } else { - m_normalIcon = null; + normalIcon = null; } - - super.setIcon(m_normalIcon); + super.setIcon(normalIcon); } /** * Preserve rollover icons over UI changes. */ - public void updateUI() { + @Override public void updateUI() { super.updateUI(); - - m_fWindowsLNF = UIManager.getLookAndFeel().getID().compareToIgnoreCase("Windows") == 0; - - if (m_fWindowsLNF) { - setBorderPainted(m_fMouseOver); - } else { - setBorderPainted(true); - } - - if (m_fMouseOver) { - setIcon(m_rolloverIcon); - } else { - setIcon(m_normalIcon); - } + setBorderPainted(true); + setIcon(normalIcon); } - public void setEnabled(boolean fEnabled) { + @Override public void setEnabled(final boolean fEnabled) { super.setEnabled(fEnabled); - setRolloverIcon(m_rolloverIcon); - setIcon(m_normalIcon); + setRolloverIcon(rolloverIcon); + setIcon(normalIcon); } -} + +} // class CFancyButton Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-25 18:09:23 UTC (rev 12) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-05-25 19:24:27 UTC (rev 13) @@ -233,7 +233,7 @@ // our global object parser archObjectParser = new ArchObjectParser(this); - animationObject = new AnimationObject(this); + animationObject = new AnimationObject(); // read in the type & type field definitions archObjectParser.loadTypeNumbers(); Modified: trunk/crossfire/src/cfeditor/CMainToolbar.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainToolbar.java 2006-05-25 18:09:23 UTC (rev 12) +++ trunk/crossfire/src/cfeditor/CMainToolbar.java 2006-05-25 19:24:27 UTC (rev 13) @@ -140,8 +140,8 @@ m_control.newLevelWanted(); } }); - m_new.setVerticalTextPosition(CFancyButton.BOTTOM); - m_new.setHorizontalTextPosition(CFancyButton.CENTER); + m_new.setVerticalTextPosition(JButton.BOTTOM); + m_new.setHorizontalTextPosition(JButton.CENTER); buttons.addElement(m_new); add(m_new); @@ -154,8 +154,8 @@ m_control.openFileWanted(); } }); - m_open.setVerticalTextPosition(CFancyButton.BOTTOM); - m_open.setHorizontalTextPosition(CFancyButton.CENTER); + m_open.setVerticalTextPosition(JButton.BOTTOM); + m_open.setHorizontalTextPosition(JButton.CENTER); buttons.addElement(m_open); add(m_open); @@ -168,8 +168,8 @@ m_control.saveCurrentLevelWanted(); } }); - m_save.setVerticalTextPosition(CFancyButton.BOTTOM); - m_save.setHorizontalTextPosition(CFancyButton.CENTER); + m_save.setVerticalTextPosition(JButton.BOTTOM); + m_save.setHorizontalTextPosition(JButton.CENTER); buttons.addElement(m_save); add(m_save); @@ -182,8 +182,8 @@ m_control.saveCurrentLevelAsWanted(); } }); - m_saveAs.setVerticalTextPosition(CFancyButton.BOTTOM); - m_saveAs.setHorizontalTextPosition(CFancyButton.CENTER); + m_saveAs.setVerticalTextPosition(JButton.BOTTOM); + m_saveAs.setHorizontalTextPosition(JButton.CENTER); buttons.addElement(m_saveAs); add(m_saveAs); @@ -198,8 +198,8 @@ m_control.undoWanted(); } }); - m_undo.setVerticalTextPosition(CFancyButton.BOTTOM); - m_undo.setHorizontalTextPosition(CFancyButton.CENTER); + m_undo.setVerticalTextPosition(JButton.BOTTOM); + m_undo.setHorizontalTextPosition(JButton.CENTER); buttons.addElement(m_undo); add(m_undo); @@ -212,8 +212,8 @@ m_control.redoWanted(); } }); - m_redo.setVerticalTextPosition(CFancyButton.BOTTOM); - m_redo.setHorizontalTextPosition(CFancyButton.CENTER); + m_redo.setVerticalTextPosition(JButton.BOTTOM); + m_redo.setHorizontalTextPosition(JButton.CENTER); buttons.addElement(m_redo); add(m_redo); @@ -228,8 +228,8 @@ m_control.previousWindowWanted(); } }); - m_prevWindow.setVerticalTextPosition(CFancyButton.BOTTOM); - m_prevWindow.setHorizontalTextPosition(CFancyButton.CENTER); + m_prevWindow.setVerticalTextPosition(JButton.BOTTOM); + m_prevWindow.setHorizontalTextPosition(JButton.CENTER); buttons.addElement(m_prevWindow); add(m_prevWindow); @@ -242,8 +242,8 @@ m_control.nextWindowWanted(); } }); - m_nextWindow.setVerticalTextPosition(CFancyButton.BOTTOM); - m_nextWindow.setHorizontalTextPosition(CFancyButton.CENTER); + m_nextWindow.setVerticalTextPosition(JButton.BOTTOM); + m_nextWindow.setHorizontalTextPosition(JButton.CENTER); buttons.addElement(m_nextWindow); add(m_nextWindow); Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-05-25 18:09:23 UTC (rev 12) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-05-25 19:24:27 UTC (rev 13) @@ -38,10 +38,13 @@ import javax.swing.BorderFactory; import javax.swing.DefaultListCellRenderer; import javax.swing.DefaultListModel; +import javax.swing.JButton; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.JViewport; +import static javax.swing.JViewport.SIMPLE_SCROLL_MODE; +import static javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER; +import static javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -87,7 +90,7 @@ m_list.setBackground(Color.lightGray); scrollPane = new JScrollPane(m_list); scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); + scrollPane.getViewport().setScrollMode(SIMPLE_SCROLL_MODE); add(scrollPane, BorderLayout.CENTER); JPanel dummy = new JPanel(); @@ -95,9 +98,9 @@ dummy.setLayout(new GridLayout(2, 1)); } JScrollPane scrollPane2 = new JScrollPane(dummy); - scrollPane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); - scrollPane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - scrollPane2.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); + scrollPane2.setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_NEVER); + scrollPane2.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_NEVER); + scrollPane2.getViewport().setScrollMode(SIMPLE_SCROLL_MODE); if (!m_view.isMapTileListBottom()) { add(scrollPane2, BorderLayout.SOUTH); // put up/down buttons south } else { @@ -112,8 +115,8 @@ m_control.moveTileDown(getMapTileSelection(), true); } }); - buttonDown.setVerticalTextPosition(CFancyButton.BOTTOM); - buttonDown.setHorizontalTextPosition(CFancyButton.CENTER); + buttonDown.setVerticalTextPosition(JButton.BOTTOM); + buttonDown.setHorizontalTextPosition(JButton.CENTER); if (!m_view.isMapTileListBottom()) { dummy.add(buttonDown, BorderLayout.EAST); } @@ -125,8 +128,8 @@ m_control.moveTileUp(getMapTileSelection(), true); } }); - buttonUp.setVerticalTextPosition(CFancyButton.BOTTOM); - buttonUp.setHorizontalTextPosition(CFancyButton.CENTER); + buttonUp.setVerticalTextPosition(JButton.BOTTOM); + buttonUp.setHorizontalTextPosition(JButton.CENTER); if (!m_view.isMapTileListBottom()) { dummy.add(buttonUp, BorderLayout.WEST); } else { Modified: trunk/crossfire/src/cfeditor/ExitTypes.java =================================================================== --- trunk/crossfire/src/cfeditor/ExitTypes.java 2006-05-25 18:09:23 UTC (rev 12) +++ trunk/crossfire/src/cfeditor/ExitTypes.java 2006-05-25 19:24:27 UTC (rev 13) @@ -3,19 +3,21 @@ package cfeditor; import java.util.HashSet; +import java.util.Set; -/** +/** Contains a list of all types that are exits. * @author Andreas Kirschbaum + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class ExitTypes -{ +public class ExitTypes { + /** List of exit object types. (Integer values) */ - private static final HashSet _exitTypes = new HashSet(); + private static final Set<Integer> EXIT_TYPES = new HashSet<Integer>(); static { - _exitTypes.add(new Integer(41)); // teleporter - _exitTypes.add(new Integer(66)); // exit - _exitTypes.add(new Integer(94)); // pit - _exitTypes.add(new Integer(95)); // trapdoor + EXIT_TYPES.add(41); // teleporter + EXIT_TYPES.add(66); // exit + EXIT_TYPES.add(94); // pit + EXIT_TYPES.add(95); // trapdoor } // Prevent instantiation. @@ -26,8 +28,10 @@ * Determine whether a given ArchObject is an "exit". */ public static boolean contains(final ArchObject exit) { - if (exit == null) throw new IllegalArgumentException(); + if (exit == null) { + throw new IllegalArgumentException(); + } + return EXIT_TYPES.contains(exit.getArchTypNr()); + } - return _exitTypes.contains(new Integer(exit.getArchTypNr())); - } -} +} // class ExitTypes Modified: trunk/crossfire/src/cfeditor/JarResources.java =================================================================== --- trunk/crossfire/src/cfeditor/JarResources.java 2006-05-25 18:09:23 UTC (rev 12) +++ trunk/crossfire/src/cfeditor/JarResources.java 2006-05-25 19:24:27 UTC (rev 13) @@ -55,9 +55,6 @@ private static final Logger log = Logger.getLogger(JarResources.class); - // external debug flag - private boolean debugOn = false; - // jar resource mapping tables private final Hashtable htSizes = new Hashtable(); private final Hashtable htJarContents = new Hashtable(); @@ -128,7 +125,7 @@ FileInputStream fis = new FileInputStream(jarFileName); BufferedInputStream bis = new BufferedInputStream(fis); ZipInputStream zis = new ZipInputStream(bis); - ZipEntry ze = null; + ZipEntry ze; while ((ze = zis.getNextEntry()) != null) { if (ze.isDirectory()) { continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 18:09:30
|
Revision: 12 Author: christianhujer Date: 2006-05-25 11:09:23 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=12&view=rev Log Message: ----------- Fixed bug in project link. Modified Paths: -------------- trunk/src/doc/transform.xslt Modified: trunk/src/doc/transform.xslt =================================================================== --- trunk/src/doc/transform.xslt 2006-05-25 15:37:30 UTC (rev 11) +++ trunk/src/doc/transform.xslt 2006-05-25 18:09:23 UTC (rev 12) @@ -50,7 +50,7 @@ <xsl:apply-templates select="@*"/> <div class="header"> <a accesskey="h" href="/">Home</a> - <a accesskey="s" href="http://sourceforge.net/projects/japi/">SF Project Home</a> + <a accesskey="s" href="http://sourceforge.net/projects/gridarta/">SF Project Home</a> </div> <div class="content"> <xsl:if test="not(html:h1)"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-05-25 15:37:40
|
Revision: 11 Author: christianhujer Date: 2006-05-25 08:37:30 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=11&view=rev Log Message: ----------- Added stylesheet for documentation. Added Paths: ----------- trunk/src/doc/sitestyle.css Added: trunk/src/doc/sitestyle.css =================================================================== --- trunk/src/doc/sitestyle.css (rev 0) +++ trunk/src/doc/sitestyle.css 2006-05-25 15:37:30 UTC (rev 11) @@ -0,0 +1,136 @@ +html { + background-color: white; +} + +body { + margin: auto auto; + padding-left: 6%; + padding-right: 6%; + background-color: white; + /*background-image: url(http://www.w3.org/Icons/logo-WMVS.png);*/ + background-attachment: fixed; + background-position: 0 0; + background-repeat: no-repeat; + color: #11111A; + font-family: Helvetica, "Trebuchet MS", Arial, sans-serif; + font-size: 1em; /* setting base font to user's prefered size */ + line-height: 130%; +} + +div.header { + background-color: #eee; + height:45px; + text-align:center; +} + +div.header a { + margin-left:1.5em; + margin-right:1.5em; +} + +div.content { + background-color: white; + border-bottom: 0; + border-left: 1px solid #eee; + border-right: 1px solid #eee; + border-top: 0; + margin: 0px; + padding: 15px; +} +address { + background-color: #eee; + background-image: url(http://validator.w3.org/images/footer.jpg); + background-repeat: no-repeat; + background-attachment: scroll; + background-position: right; + height:45px; + padding-top: 10px; + padding-bottom: 0; + padding-left: 15px; + clear: right; + +} + +address img { + display: inline; + float: left; + vertical-align: middle; + width: 88px; + border:none; +} + +p.copyright { + margin-top: 20px; + width: 50%; + font-size: x-small; + text-align: justify; + text-transform: uppercase; + margin-left: 222px; + font-family: "Bitstream Vera Sans Mono", monospace; + color: #888; + line-height: 120%; +} + +p.copyright a { + color: #88f; + text-decoration: none; +} + +img.screenshot { + display: inline; + vertical-align: top; + margin:3px; + border: 1px solid #eee; +} + +img.now { + width:88px; + height:31px; + margin:1px; +} + +fieldset.screenshot { + padding: .5em; + background: white; + border: 1px dotted #aaaa77; + margin-left: 20px; + margin-right: 20px; + margin-top: .5em; +} + +fieldset.screenshot legend { + color: #fff; + background-color: #aaaa77; + font-size: smaller; + padding: .1ex .5ex; + border-right: 1px solid gray; + border-bottom: 1px solid gray; + font-weight: bold; +} + +pre.listing { + font-size: 10pt; +} + +/* Java */ +td.java, td.java-ln {vertical-align:top;} +tt.java, tt.java-ln, pre.java, pre.java-ln {line-height:1em; margin-bottom:0em;} +td.java-ln { text-align:right; } +tt.java-ln, pre.java-ln { color:#888888 } +/* Background */ span.java0 { color:#ffffff; } +/* Line numbers */ span.java1 { color:#808080; } +/* Multi-line comments */ span.java2 { color:#3f7f5f; } +/* Single-line comments */ span.java3 { color:#3f7f5f; } +/* Keywords */ span.java4 { color:#7f0055; font-weight:bold; } +/* Strings */ span.java5 { color:#2a00ff; } +/* Character constants */ span.java6 { color:#990000; } +/* Numeric constants */ span.java7 { color:#990000; } +/* Parenthesis */ span.java8 { color:#000000; } +/* Primitive Types */ span.java9 { color:#7f0055; font-weight:bold; } +/* Others */ span.java10 { color:#000000; } +/* Javadoc keywords */ span.java11 { color:#7f9fbf; } +/* Javadoc HTML tags */ span.java12 { color:#7f7f9f; } +/* Javadoc links */ span.java13 { color:#3f3fbf; } +/* Javadoc others */ span.java14 { color:#3f5fbf; } +/* Undefined */ span.java15 { color:#ff6100; } +/* Annotation */ span.java16 { color:#646464; } Property changes on: trunk/src/doc/sitestyle.css ___________________________________________________________________ Name: svn:mime-type + text/css 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...> - 2006-05-25 13:03:14
|
Revision: 10 Author: christianhujer Date: 2006-05-25 06:02:59 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/gridarta/?rev=10&view=rev Log Message: ----------- Added developer documentation. Modified Paths: -------------- trunk/src/doc/start.xhtml Added Paths: ----------- trunk/src/doc/dev/ trunk/src/doc/dev/codeStyle.xhtml trunk/src/doc/dev/start.xhtml Added: trunk/src/doc/dev/codeStyle.xhtml =================================================================== --- trunk/src/doc/dev/codeStyle.xhtml (rev 0) +++ trunk/src/doc/dev/codeStyle.xhtml 2006-05-25 13:02:59 UTC (rev 10) @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!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" /> + <title>Gridarta Development Documentation: Code Conventions</title> + </head> + <body> + <p> + This document describes the Code Conventions used for Gridarta. + </p> + <p> + <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Code Conventions for the JavaTM Programming Language</a> apply with + one exception: + Contents of switch are indented. + </p> + <p> + Additionally, the following set of rules applies: + </p> + <ul> + <li>Imports are sorted alphabetically by package, within a package alphabetically by class.</li> + <li>The *-form of import is not allowed.</li> + <li>The brief of a javadoc comment starts in the first line of the comment, right after <code>/**</code>.</li> + </ul> + </body> +</html> Property changes on: trunk/src/doc/dev/codeStyle.xhtml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + LF Added: trunk/src/doc/dev/start.xhtml =================================================================== --- trunk/src/doc/dev/start.xhtml (rev 0) +++ trunk/src/doc/dev/start.xhtml 2006-05-25 13:02:59 UTC (rev 10) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!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" /> + <title>Gridarta Development Documentation</title> + </head> + <body> + <h2>Contents</h2> + <ul> + <li><a href="codeStyle">Gridarta Code Conventions</a></li> + </ul> + </body> +</html> Property changes on: trunk/src/doc/dev/start.xhtml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + LF Modified: trunk/src/doc/start.xhtml =================================================================== --- trunk/src/doc/start.xhtml 2006-05-25 11:23:53 UTC (rev 9) +++ trunk/src/doc/start.xhtml 2006-05-25 13:02:59 UTC (rev 10) @@ -33,9 +33,10 @@ Gridarta can't be downloaded yet. <!--To <em>download Gridarta</em>, go to the <a href="http://sourceforge.net/project/showfiles.php?group_id=166996">Files section of the Gridarta Project Page</a>, choose the desired package, release and file type and download it from a mirror of your choice.--> </p> - <!--h2>Documentation</h2> + <h2>Documentation</h2> <ul> - </ul--> + <li><a href="dev/">Developer Documentation</a> Information for Gridarta Developers</li> + </ul> <h2>Contact the developers</h2> <ul> <li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |