From: <aki...@us...> - 2008-07-29 20:17:44
|
Revision: 4578 http://gridarta.svn.sourceforge.net/gridarta/?rev=4578&view=rev Author: akirschbaum Date: 2008-07-29 20:17:49 +0000 (Tue, 29 Jul 2008) Log Message: ----------- Rename ArchAttribType to ArchetypeAttributeType. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttribute.java trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeParser.java trunk/src/app/net/sf/gridarta/archtype/ArchetypeTypeParser.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialog.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeType.java Removed Paths: ------------- trunk/src/app/net/sf/gridarta/gameobject/ArchAttribType.java Modified: trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2008-07-29 20:07:21 UTC (rev 4577) +++ trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2008-07-29 20:17:49 UTC (rev 4578) @@ -34,9 +34,9 @@ import net.sf.gridarta.MainControl; import net.sf.gridarta.MapManager; import net.sf.gridarta.archtype.ArchetypeAttribute; +import net.sf.gridarta.archtype.ArchetypeAttributeType; import net.sf.gridarta.archtype.ArchetypeType; import net.sf.gridarta.archtype.ArchetypeTypeSet; -import net.sf.gridarta.gameobject.ArchAttribType; import net.sf.gridarta.gameobject.ArchetypeSet; import net.sf.gridarta.gameobject.anim.AnimationObjects; import net.sf.gridarta.gameobject.face.FaceObjects; @@ -99,7 +99,7 @@ // do we have "none" spell? final int selectedIndex; - if (spnum == 0 && attr.getDataType() == ArchAttribType.ZSPELL) { + if (spnum == 0 && attr.getDataType() == ArchetypeAttributeType.ZSPELL) { selectedIndex = 0; } else { // now look up the spell-number in the array of spells @@ -148,7 +148,7 @@ String newFace = null; String newMsg = null; for (final DialogAttrib<?> attr : dialogAttribs) { - final ArchAttribType dType = attr.ref.getDataType(); + final ArchetypeAttributeType dType = attr.ref.getDataType(); switch (dType) { case BOOL: { @@ -176,17 +176,17 @@ case LONG: case FLOAT: { // an int attribute - if (dType == ArchAttribType.INT && ((DialogAttrib<JFormattedTextField>) attr).getInput().getText().trim().length() == 0) { + if (dType == ArchetypeAttributeType.INT && ((DialogAttrib<JFormattedTextField>) attr).getInput().getText().trim().length() == 0) { if (archetype.getAttributeInt(attr.ref.getNameOld()) != 0) { newArchText.append(attr.ref.getNameOld()).append(" 0\n"); } } else - if (dType == ArchAttribType.LONG && ((DialogAttrib<JFormattedTextField>) attr).getInput().getText().trim().length() == 0) { + if (dType == ArchetypeAttributeType.LONG && ((DialogAttrib<JFormattedTextField>) attr).getInput().getText().trim().length() == 0) { if (archetype.getAttributeLong(attr.ref.getNameOld()) != 0) { newArchText.append(attr.ref.getNameOld()).append(" 0\n"); } } else - if (dType == ArchAttribType.FLOAT && ((DialogAttrib<JFormattedTextField>) attr).getInput().getText().trim().length() == 0) { + if (dType == ArchetypeAttributeType.FLOAT && ((DialogAttrib<JFormattedTextField>) attr).getInput().getText().trim().length() == 0) { if (archetype.getAttributeString(attr.ref.getNameOld()).length() > 0) { newArchText.append(attr.ref.getNameOld()).append(" 0.0\n"); } @@ -325,7 +325,7 @@ case INV_SPELL_OPTIONAL: { final JComboBox comboBox = ((DialogAttrib<JComboBox>) attr).getInput(); final int index = comboBox.getSelectedIndex(); - final boolean isOptionalSpell = dType == ArchAttribType.INV_SPELL_OPTIONAL; + final boolean isOptionalSpell = dType == ArchetypeAttributeType.INV_SPELL_OPTIONAL; if (index < mainControl.getGameObjectSpells().size() + (isOptionalSpell ? 1 : 0)) { final boolean isModified; switch (gameObject.countInvObjects()) { @@ -430,7 +430,7 @@ // Also write all the 'fixed' attributes into the archtext for (int i = 0; type.getAttr().length > i; i++) { // ### TODO: for changed types, copy fixed attributes over default arches ### - if (type.getAttr()[i].getDataType() == ArchAttribType.FIXED) { + if (type.getAttr()[i].getDataType() == ArchetypeAttributeType.FIXED) { final String defaultValue = archetype.getAttributeString(type.getAttr()[i].getNameOld()); if (defaultValue.length() == 0 || (gameObject.getArchTypNr() != archetype.getArchTypNr() && !defaultValue.equalsIgnoreCase(type.getAttr()[i].getNameNew()))) { // usually, fixed attributes are only applied when *not* defined in the archetype. Modified: trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2008-07-29 20:07:21 UTC (rev 4577) +++ trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2008-07-29 20:17:49 UTC (rev 4578) @@ -34,9 +34,9 @@ import net.sf.gridarta.MainControl; import net.sf.gridarta.MapManager; import net.sf.gridarta.archtype.ArchetypeAttribute; +import net.sf.gridarta.archtype.ArchetypeAttributeType; import net.sf.gridarta.archtype.ArchetypeType; import net.sf.gridarta.archtype.ArchetypeTypeSet; -import net.sf.gridarta.gameobject.ArchAttribType; import net.sf.gridarta.gameobject.ArchetypeSet; import net.sf.gridarta.gameobject.anim.AnimationObjects; import net.sf.gridarta.gameobject.face.FaceObjects; @@ -98,7 +98,7 @@ // do we have "none" spell? final int selectedIndex; - if (spnum == -1 && attr.getDataType() == ArchAttribType.ZSPELL) { + if (spnum == -1 && attr.getDataType() == ArchetypeAttributeType.ZSPELL) { selectedIndex = 0; } else { // now look up the spell-number in the array of spells @@ -147,7 +147,7 @@ String newFace = null; String newMsg = null; for (final DialogAttrib<?> attr : dialogAttribs) { - final ArchAttribType dType = attr.ref.getDataType(); + final ArchetypeAttributeType dType = attr.ref.getDataType(); switch (dType) { case BOOL: { @@ -177,7 +177,7 @@ // an int attribute if (((DialogAttrib<JFormattedTextField>) attr).getInput().getText().equals("0")) { if (archetype.getAttributeDouble(attr.ref.getNameOld()) != 0.0) { - newArchText.append(attr.ref.getNameOld()).append(" ").append(dType == ArchAttribType.FLOAT ? "0.0" : "0").append("\n"); + newArchText.append(attr.ref.getNameOld()).append(" ").append(dType == ArchetypeAttributeType.FLOAT ? "0.0" : "0").append("\n"); } } else { try { @@ -359,7 +359,7 @@ // Also write all the 'fixed' attributes into the archtext for (int i = 0; type.getAttr().length > i; i++) { // ### TODO: for changed types, copy fixed attributes over default arches ### - if (type.getAttr()[i].getDataType() == ArchAttribType.FIXED) { + if (type.getAttr()[i].getDataType() == ArchetypeAttributeType.FIXED) { final String defaultValue = archetype.getAttributeString(type.getAttr()[i].getNameOld()); if (defaultValue.length() == 0 || (gameObject.getArchTypNr() != archetype.getArchTypNr() && !defaultValue.equalsIgnoreCase(type.getAttr()[i].getNameNew()))) { // usually, fixed attributes are only applied when *not* defined in the archetype. Modified: trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttribute.java =================================================================== --- trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttribute.java 2008-07-29 20:07:21 UTC (rev 4577) +++ trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttribute.java 2008-07-29 20:17:49 UTC (rev 4578) @@ -19,7 +19,6 @@ package net.sf.gridarta.archtype; -import net.sf.gridarta.gameobject.ArchAttribType; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -38,14 +37,14 @@ private final String nameOld; @Nullable - private final String endingOld; // for dataType = ArchAttribType.TEXT this is the terminating string + private final String endingOld; // for dataType = ArchetypeAttributeType.TEXT this is the terminating string // (example: 'endmsg' for arch message) @NotNull private final String nameNew; // new attr. name (for the user-friendly GUI) /** Datatype of this attribute. */ - private final ArchAttribType dataType; + private final ArchetypeAttributeType dataType; /** Description of this attribute. */ private final String text; @@ -55,10 +54,10 @@ @Nullable private final String[] misc; // string array for misc. use - // ArchAttribType.BOOL_SPEC uses misc[0] = true value, misc[1] = false value - // ArchAttribType.BITMASK uses misc[0] = bitmask name - // ArchAttribType.LIST uses misc[0] = list name - // ArchAttribType.TEXT uses misc[0] = file extension; may be null + // ArchetypeAttributeType.BOOL_SPEC uses misc[0] = true value, misc[1] = false value + // ArchetypeAttributeType.BITMASK uses misc[0] = bitmask name + // ArchetypeAttributeType.LIST uses misc[0] = list name + // ArchetypeAttributeType.TEXT uses misc[0] = file extension; may be null /** Identifier of the section this CFArchAttrib is in. */ private int secId; @@ -67,7 +66,7 @@ private String section; /** Create a CFArchAttrib. */ - public ArchetypeAttribute(@NotNull final String nameOld, @Nullable final String endingOld, @NotNull final String nameNew, final ArchAttribType dataType, final String text, final int inputLength, final String[] misc) { + public ArchetypeAttribute(@NotNull final String nameOld, @Nullable final String endingOld, @NotNull final String nameNew, final ArchetypeAttributeType dataType, final String text, final int inputLength, final String[] misc) { this.nameOld = nameOld; this.endingOld = endingOld; this.nameNew = nameNew; @@ -122,7 +121,7 @@ return nameNew; } - public ArchAttribType getDataType() { + public ArchetypeAttributeType getDataType() { return dataType; } Modified: trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeParser.java 2008-07-29 20:07:21 UTC (rev 4577) +++ trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeParser.java 2008-07-29 20:17:49 UTC (rev 4578) @@ -20,7 +20,6 @@ package net.sf.gridarta.archtype; import net.sf.gridarta.CommonConstants; -import net.sf.gridarta.gameobject.ArchAttribType; import org.apache.log4j.Logger; import org.w3c.dom.Attr; import org.w3c.dom.Element; @@ -75,7 +74,7 @@ String nameOld = ""; String endingOld = null; String nameNew = ""; - ArchAttribType dataType = null; + ArchetypeAttributeType dataType = null; int inputLength = 0; String[] misc = null; @@ -111,10 +110,10 @@ // which type of attribute is it? if (atype.equalsIgnoreCase("bool")) { - dataType = ArchAttribType.BOOL; // normal bool + dataType = ArchetypeAttributeType.BOOL; // normal bool } else if (atype.equalsIgnoreCase("bool_special")) { // customized boolean type: - dataType = ArchAttribType.BOOL_SPEC; + dataType = ArchetypeAttributeType.BOOL_SPEC; // parse true and false values: a1 = root.getAttributeNode("true"); @@ -128,23 +127,23 @@ misc[0] = a1.getValue().trim(); // string for true misc[1] = a2.getValue().trim(); // string for false } else if (atype.equalsIgnoreCase("int")) { - dataType = ArchAttribType.INT; + dataType = ArchetypeAttributeType.INT; } else if (atype.equalsIgnoreCase("long")) { - dataType = ArchAttribType.LONG; + dataType = ArchetypeAttributeType.LONG; } else if (atype.equalsIgnoreCase("float")) { - dataType = ArchAttribType.FLOAT; + dataType = ArchetypeAttributeType.FLOAT; } else if (atype.equalsIgnoreCase("string")) { - dataType = ArchAttribType.STRING; + dataType = ArchetypeAttributeType.STRING; } else if (atype.equalsIgnoreCase("map_path")) { - dataType = ArchAttribType.MAP_PATH; + dataType = ArchetypeAttributeType.MAP_PATH; } else if (atype.equalsIgnoreCase("script_file")) { - dataType = ArchAttribType.SCRIPT_FILE; + dataType = ArchetypeAttributeType.SCRIPT_FILE; } else if (atype.equalsIgnoreCase("facename")) { - dataType = ArchAttribType.FACENAME; + dataType = ArchetypeAttributeType.FACENAME; } else if (atype.equalsIgnoreCase("animname")) { - dataType = ArchAttribType.ANIMNAME; + dataType = ArchetypeAttributeType.ANIMNAME; } else if (atype.equalsIgnoreCase("text")) { - dataType = ArchAttribType.TEXT; + dataType = ArchetypeAttributeType.TEXT; // for text data, the terminating string has to be read too if ((a1 = root.getAttributeNode(XML_KEY_ARCH_BEGIN)) != null) { nameOld = a1.getValue().trim(); @@ -165,7 +164,7 @@ } } else if ("fixed".equalsIgnoreCase(atype)) { // fixed attribute - dataType = ArchAttribType.FIXED; + dataType = ArchetypeAttributeType.FIXED; if ((a1 = root.getAttributeNode("value")) != null) { nameNew = a1.getValue().trim(); } else { @@ -174,23 +173,23 @@ } } else if ("spell".equalsIgnoreCase(atype)) { // spell attribute - dataType = ArchAttribType.SPELL; + dataType = ArchetypeAttributeType.SPELL; } else if ("nz_spell".equalsIgnoreCase(atype)) { // spell attribute - dataType = ArchAttribType.ZSPELL; + dataType = ArchetypeAttributeType.ZSPELL; } else if ("inv_spell".equalsIgnoreCase(atype)) { // spell attribute - dataType = ArchAttribType.INV_SPELL; + dataType = ArchetypeAttributeType.INV_SPELL; } else if ("inv_spell_optional".equalsIgnoreCase(atype)) { // spell attribute - dataType = ArchAttribType.INV_SPELL_OPTIONAL; + dataType = ArchetypeAttributeType.INV_SPELL_OPTIONAL; } else if (atype.startsWith("bitmask")) { // got a bitmask attribute final String bitmaskName = atype.substring(8).trim(); if (tlist.getBitmaskTable().containsKey(bitmaskName)) { // the bitmask is well defined - dataType = ArchAttribType.BITMASK; + dataType = ArchetypeAttributeType.BITMASK; misc = new String[1]; misc[0] = bitmaskName; // store bitmask name in misc[0] } else { @@ -202,7 +201,7 @@ final String listName = atype.substring(5).trim(); if (tlist.getListTable().containsKey(listName)) { // the list is well defined - dataType = ArchAttribType.LIST; + dataType = ArchetypeAttributeType.LIST; misc = new String[1]; misc[0] = listName; // store list name in misc[0] } else { @@ -224,7 +223,7 @@ if (tlist.getListTable().containsKey(listName1) && tlist.getListTable().containsKey(listName2)) { // the lists are well defined - dataType = ArchAttribType.DBLLIST; + dataType = ArchetypeAttributeType.DBLLIST; misc = new String[2]; misc[0] = listName1; // store list name in misc[0] misc[1] = listName2; // store list name in misc[1] @@ -232,7 +231,7 @@ log.error("In '" + CommonConstants.TYPEDEF_FILE + "', type " + typeName + ": List \"" + listName1 + "\" or \"" + listName2 + "\" is undefined."); } } else if ("treasurelist".equalsIgnoreCase(atype)) { - dataType = ArchAttribType.TREASURE; + dataType = ArchetypeAttributeType.TREASURE; } else { // unknown type log.warn("In '" + CommonConstants.TYPEDEF_FILE + "': Type " + typeName + " has an attribute with unknown type: '" + atype + "'."); Copied: trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeType.java (from rev 4577, trunk/src/app/net/sf/gridarta/gameobject/ArchAttribType.java) =================================================================== --- trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeType.java (rev 0) +++ trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeType.java 2008-07-29 20:17:49 UTC (rev 4578) @@ -0,0 +1,88 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2007 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.archtype; + +/** + * Enumeration for Archetype Attribute Types. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public enum ArchetypeAttributeType { + + /** Boolean -> Checkbox. */ + BOOL, + + /** Boolean -> Checkbox, with customized true/false values. */ + BOOL_SPEC, + + /** Integer -> Textfield. */ + INT, + + /** Long -> Textfield. */ + LONG, + + /** Float -> Textfield. */ + FLOAT, + + /** String -> Textfield. */ + STRING, + + /** Map path name. */ + MAP_PATH, + + /** Script file name. */ + SCRIPT_FILE, + + /** Text -> Textarea. */ + TEXT, + + /** Fixed String -> (No input). */ + FIXED, + + /** Spell -> Spell number (Combobox). */ + SPELL, + + /** ZSpell -> Spell number (except that 0 is always 0, not magic bullet). */ + ZSPELL, + + /** Spell object in inventory -> Spell name (Combobox). */ + INV_SPELL, + + /** Optional spell object in inventory -> Spell name (Combobox). */ + INV_SPELL_OPTIONAL, + + /** Bitmask -> Special input with popup frame. */ + BITMASK, + + /** List -> Combobox. */ + LIST, + + /** Treasure -> treasurelist (Textfield and Tree). */ + TREASURE, + + /** Double List -> 2 × Combobox. */ + DBLLIST, + + /** Face name -> Textfield and Tree. */ + FACENAME, + + /** Animation name -> Textfield and Tree. */ + ANIMNAME + +} // enum ArchetypeAttributeType Property changes on: trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeType.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/archtype/ArchetypeTypeParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/archtype/ArchetypeTypeParser.java 2008-07-29 20:07:21 UTC (rev 4577) +++ trunk/src/app/net/sf/gridarta/archtype/ArchetypeTypeParser.java 2008-07-29 20:17:49 UTC (rev 4578) @@ -26,7 +26,6 @@ import java.util.Map; import java.util.Set; import net.sf.gridarta.CommonConstants; -import net.sf.gridarta.gameobject.ArchAttribType; import net.sf.japi.xml.NodeListIterator; import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; @@ -357,7 +356,7 @@ attrList.add(attrib); // parsing succeeded, now assign this attribute to a section - if (attrib.getDataType() == ArchAttribType.TEXT) { + if (attrib.getDataType() == ArchetypeAttributeType.TEXT) { // text attributes all have their own section attrib.setSection(archetypeType.sectionNum, attrib.getNameNew()); archetypeType.sectionNum++; Deleted: trunk/src/app/net/sf/gridarta/gameobject/ArchAttribType.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/ArchAttribType.java 2008-07-29 20:07:21 UTC (rev 4577) +++ trunk/src/app/net/sf/gridarta/gameobject/ArchAttribType.java 2008-07-29 20:17:49 UTC (rev 4578) @@ -1,88 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2007 The Gridarta Developers. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package net.sf.gridarta.gameobject; - -/** - * Enumeration for Archetype Attribute Types. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public enum ArchAttribType { - - /** Boolean -> Checkbox. */ - BOOL, - - /** Boolean -> Checkbox, with customized true/false values. */ - BOOL_SPEC, - - /** Integer -> Textfield. */ - INT, - - /** Long -> Textfield. */ - LONG, - - /** Float -> Textfield. */ - FLOAT, - - /** String -> Textfield. */ - STRING, - - /** Map path name. */ - MAP_PATH, - - /** Script file name. */ - SCRIPT_FILE, - - /** Text -> Textarea. */ - TEXT, - - /** Fixed String -> (No input). */ - FIXED, - - /** Spell -> Spell number (Combobox). */ - SPELL, - - /** ZSpell -> Spell number (except that 0 is always 0, not magic bullet). */ - ZSPELL, - - /** Spell object in inventory -> Spell name (Combobox). */ - INV_SPELL, - - /** Optional spell object in inventory -> Spell name (Combobox). */ - INV_SPELL_OPTIONAL, - - /** Bitmask -> Special input with popup frame. */ - BITMASK, - - /** List -> Combobox. */ - LIST, - - /** Treasure -> treasurelist (Textfield and Tree). */ - TREASURE, - - /** Double List -> 2 × Combobox. */ - DBLLIST, - - /** Face name -> Textfield and Tree. */ - FACENAME, - - /** Animation name -> Textfield and Tree. */ - ANIMNAME - -} // enum ArchAttribType Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialog.java 2008-07-29 20:07:21 UTC (rev 4577) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialog.java 2008-07-29 20:17:49 UTC (rev 4578) @@ -74,10 +74,10 @@ import net.sf.gridarta.CommonConstants; import net.sf.gridarta.MainControl; import net.sf.gridarta.archtype.ArchetypeAttribute; +import net.sf.gridarta.archtype.ArchetypeAttributeType; import net.sf.gridarta.archtype.ArchetypeType; import net.sf.gridarta.archtype.ArchetypeTypeSet; import net.sf.gridarta.archtype.CAttribBitmask; -import net.sf.gridarta.gameobject.ArchAttribType; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.ArchetypeSet; import net.sf.gridarta.gameobject.GameObject; @@ -304,7 +304,7 @@ * @return the completed <code>JComboBox</code> */ private JComboBox buildInvSpellBox(final ArchetypeAttribute attr) { - final boolean isOptionalSpell = attr.getDataType() == ArchAttribType.INV_SPELL_OPTIONAL; + final boolean isOptionalSpell = attr.getDataType() == ArchetypeAttributeType.INV_SPELL_OPTIONAL; final Vector<String> content = new Vector<String>(); final int selectedIndex; @Nullable final String title; @@ -532,11 +532,11 @@ for (int i = 0; type.getAttr().length > i; i++) { if (type.getAttr()[i].getSecId() == secId) { // count number of attributes - if (type.getAttr()[i].getDataType() != ArchAttribType.FIXED) { + if (type.getAttr()[i].getDataType() != ArchetypeAttributeType.FIXED) { number++; } // check for bitmask attributes - if (!hasBitmask && type.getAttr()[i].getDataType() == ArchAttribType.BITMASK) { + if (!hasBitmask && type.getAttr()[i].getDataType() == ArchetypeAttributeType.BITMASK) { hasBitmask = true; } } @@ -568,8 +568,8 @@ // now add the entrys, line by line for (int i = 0; attribs.length > i; i++) { final ArchetypeAttribute attrib = attribs[i]; - final ArchAttribType dType = attrib.getDataType(); // data type of the attribute - if (attrib.getSecId() == secId && dType != ArchAttribType.FIXED) { + final ArchetypeAttributeType dType = attrib.getDataType(); // data type of the attribute + if (attrib.getSecId() == secId && dType != ArchetypeAttributeType.FIXED) { final String nameOld = attrib.getNameOld(); final JButton helpButton = new JButton("?"); helpButton.setMargin(new Insets(0, 5, 0, 5)); @@ -636,7 +636,7 @@ case LONG: case FLOAT: { cLabel = new JLabel(attrib.getNameNew() + ": "); - cLabel.setForeground(dType == ArchAttribType.FLOAT ? CommonConstants.FLOAT_COLOR : CommonConstants.INT_COLOR); + cLabel.setForeground(dType == ArchetypeAttributeType.FLOAT ? CommonConstants.FLOAT_COLOR : CommonConstants.INT_COLOR); final int fieldLength = attrib.getInputLength() == 0 ? TEXTFIELD_COLUMNS : attrib.getInputLength(); final NumberFormat format; switch (dType) { @@ -725,11 +725,11 @@ case MAP_PATH: case SCRIPT_FILE: { cLabel = new JLabel(attrib.getNameNew() + ": "); - final TilePanel tilePanel = new TilePanel(dType == ArchAttribType.MAP_PATH ? mapFileFilter : mainControl.getScriptFileFilter()); - tilePanel.setAbsoluteReference(dType == ArchAttribType.MAP_PATH ? mainControl.getGlobalSettings().getMapDir() : mainControl.getGlobalSettings().getMapDir()); + final TilePanel tilePanel = new TilePanel(dType == ArchetypeAttributeType.MAP_PATH ? mapFileFilter : mainControl.getScriptFileFilter()); + tilePanel.setAbsoluteReference(dType == ArchetypeAttributeType.MAP_PATH ? mainControl.getGlobalSettings().getMapDir() : mainControl.getGlobalSettings().getMapDir()); tilePanel.setOriginal(gameObject.getAttributeString(nameOld)); File relativeReference; - if (dType == ArchAttribType.MAP_PATH) { + if (dType == ArchetypeAttributeType.MAP_PATH) { relativeReference = gameObject.getMapSquare().getMapModel().getMapControl().getMapFile(); if (relativeReference == null) { relativeReference = new File(mainControl.getGlobalSettings().getMapDir(), "dummy"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |