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: <aki...@us...> - 2006-12-15 22:18:13
|
Revision: 1084 http://svn.sourceforge.net/gridarta/?rev=1084&view=rev Author: akirschbaum Date: 2006-12-15 14:18:14 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Unify use of ActionFactory in ScriptArchData. Modified Paths: -------------- trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/messages.properties Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-12-15 22:01:25 UTC (rev 1083) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-12-15 22:18:14 UTC (rev 1084) @@ -49,6 +49,7 @@ import javax.swing.WindowConstants; import static javax.swing.WindowConstants.HIDE_ON_CLOSE; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; +import net.sf.japi.swing.ActionFactory; import net.sf.japi.util.Arrays2; import org.apache.log4j.Logger; import org.jetbrains.annotations.Nullable; @@ -71,6 +72,9 @@ public static final int EDATA_EVENT_OPTIONS = 2; + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); + // popup frame to edit script paths: private static JDialog pathFrame; @@ -526,8 +530,7 @@ } else { // if map dir doesn't exist, this is not going to work frame.setVisible(false); - mainControl.showMessage("Invalid Map Directory", "The map directory '" + mapDir + "' does not exist!\n" + - "Please select menu 'File->Options...' and correct that.", JOptionPane.ERROR_MESSAGE); + ACTION_FACTORY.showMessageDialog(frame, "mapDirDoesntExist", mapDir); return; } } else { @@ -712,8 +715,7 @@ ScriptEditControl.getInstance().openScriptFile(scriptFile.getAbsolutePath()); } else { // file does not exist! - mainControl.showMessage("Script file not found", - "The file '" + path + "' does not exist.\nPlease correct the path.", JOptionPane.ERROR_MESSAGE); + ACTION_FACTORY.showMessageDialog(mainControl.getMainView(), "openScriptNotFound", path); } } Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-12-15 22:01:25 UTC (rev 1083) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-12-15 22:18:14 UTC (rev 1084) @@ -11,6 +11,9 @@ collectArchesNotReady.title=Arches still loading collectArchesNotReady.message=You have to wait for all arches to be loaded\nbefore you can collect them. +mapDirDoesntExist.title=Invalid map directory +mapDirDoesntExist.message=The map directory "{0}" doesn''t exist.\nPlease select menu ''File->Options...'' and correct that. + openFileWantedNoArches.title=Cannot open map openFileWantedNoArches.message=There are currently no arches avaliable!\nYou need to have arches loaded before opening a map. openFileWantedNotReady.title=Cannot open map @@ -25,6 +28,9 @@ enterExitNotSaved.title=Map not saved enterExitNotSaved.message=You must save the map first to follow a relative path. +openScriptNotFound.title=Script file not found +openScriptNotFound.message=The file ''{0}'' does not exist.\nPlease correct the path. + # Map Properties mapParametersTabTitle=Parameters mapShopTabTitle=Shop Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-15 22:01:25 UTC (rev 1083) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-15 22:18:14 UTC (rev 1084) @@ -6,6 +6,9 @@ collectArchesNotReady.title=Archetypen noch nicht geladen collectArchesNotReady.message=Sie m\xFCssen warten bis die Archetypen geladen\nsind, bevor Sie sie neu sammeln k\xF6nnen. +mapDirDoesntExist.title=Ung\xFCltiges Verzeichnis +mapDirDoesntExist.message=Das Verzeichnis f\xFCr Karten "{0}" existiert nicht.\nBitte legen sie es unter ''Datei->Optionen...'' fest. + closePickmapNotLoaded.title=Kann Pickmap nicht schlie\xDFen closePickmapNotLoaded.message=Es sind keine Pickmaps geladen.\nEntweder existieren keine Pickmaps oder\nsie sind noch nicht vollst\xE4ndig geladen. closePickmapHidden.title=Kann Pickmap nicht schlie\xDFen @@ -63,6 +66,9 @@ enterExitNotSaved.title=Karte nicht gesichert enterExitNotSaved.message=Der Ausgang verwendet einen relativen Dateinamen. Um ihm zu folgen m\xFCssen Sie die Karte vorher sichern. +openScriptNotFound.title=Script-Datei nicht gefunden +openScriptNotFound.message=Die Datei ''{0}'' existiert nicht.\nBitte geben sie einen g\xFCltigen Dateinamen an. + enterTileNoTile.title=Ziel ung\xFCltig enterTileNoTile.message=In die angegebene Richtung existiert kein Verbindungspfad. Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-12-15 22:01:25 UTC (rev 1083) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-12-15 22:18:14 UTC (rev 1084) @@ -485,7 +485,7 @@ if (!mapDir.exists()) { // if map dir doesn't exist, this is not going to work frame.setVisible(false); - ACTION_FACTORY.showMessageDialog(frame, "mapDirDoesntExist"); + ACTION_FACTORY.showMessageDialog(frame, "mapDirDoesntExist", mapDir); return false; } else { absScriptPath = mapDir.getAbsolutePath() + scriptPath; Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-15 22:01:25 UTC (rev 1083) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-15 22:18:14 UTC (rev 1084) @@ -57,7 +57,7 @@ mapUnsaved.title=Map Not Saved mapUnsaved.message=Please save this map first. -mapDirDoesntExist.title=Invalid Map Directory +mapDirDoesntExist.title=Invalid map directory mapDirDoesntExist.message=The map directory "{0}" doesn''t exist.\nPlease select menu ''File->Options...'' and correct that. openFileWantedNoArches.title=Cannot open map This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 22:01:25
|
Revision: 1083 http://svn.sourceforge.net/gridarta/?rev=1083&view=rev Author: akirschbaum Date: 2006-12-15 14:01:25 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Unify comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/CFArchAttrib.java trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/crossfire/src/cfeditor/CGUIUtils.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/CopyBuffer.java trunk/crossfire/src/cfeditor/MapViewIFrame.java trunk/crossfire/src/cfeditor/MultiPositionData.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/ScriptArchData.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CFArchAttrib.java trunk/daimonin/src/daieditor/CFArchTypeList.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/CMainView.java trunk/daimonin/src/daieditor/CMapTileList.java trunk/daimonin/src/daieditor/CPickmapPanel.java trunk/daimonin/src/daieditor/IGUIConstants.java trunk/daimonin/src/daieditor/MapViewIFrame.java trunk/daimonin/src/daieditor/MultiPositionData.java trunk/daimonin/src/daieditor/ReplaceDialog.java trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -1330,7 +1330,7 @@ imagePanel.setIcon(mainControl.getArchetypeSet().getFace(gameObject.getFaceNr())); if (newMsg != null) { - // set new msg text only when it is not equal to default gameObject + // set new msg text only when it is not equal to Archetype if (!newMsg.trim().equals(archetype.getMsgText() == null ? "" : archetype.getMsgText().trim())) { gameObject.deleteMsgText(); gameObject.addMsgText(newMsg); Modified: trunk/crossfire/src/cfeditor/CFArchAttrib.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchAttrib.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CFArchAttrib.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -59,7 +59,7 @@ private String nameOld; // original attr. name (from the CF arches) - private String endingOld; // for dataType = 'ArchAttribType.TEXT' this is the terminating string + private String endingOld; // for dataType = ArchAttribType.TEXT this is the terminating string // (example: 'endmsg' for arch message) private String nameNew; // new attr. name (for the user-friendly GUI) Modified: trunk/crossfire/src/cfeditor/CFArchTypeList.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -256,7 +256,7 @@ /** * Parse a list vector from an xml list element. * @param root element to parse - * @return List with data parsed from <var>root</var>. + * @return List with data parsed from <var>root</var> */ private List<?> parseListFromElement(final Element root) { final List<Object> list = new ArrayList<Object>(); Modified: trunk/crossfire/src/cfeditor/CGUIUtils.java =================================================================== --- trunk/crossfire/src/cfeditor/CGUIUtils.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CGUIUtils.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -54,6 +54,7 @@ private static final Map<String, ImageIcon> imageCache = new HashMap<String, ImageIcon>(); + /** Do not subclass. */ private CGUIUtils() { } Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -966,7 +966,7 @@ /** * Browse first through the default arch list and attach map arches to it * then browse through the face list and try to find the pictures. - * @param objects GameObjects to collect. + * @param objects List of GameObjects to collect * @param file File (for error messages). * @return <code>true</code> in case of success, otherwise <code>false</code>. * @note The current implementation always returns <code>true</code>. Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -161,7 +161,7 @@ /** * Constructs the main view and registers the given main controller. - * @param mainControl The controller of this view. + * @param mainControl the controller of this view */ CMainView() { super(IGUIConstants.APP_NAME + " - " + IGUIConstants.APP_WINDOW_TITLE); @@ -183,7 +183,7 @@ /** * Initialises (builds) this view. - * @param doShow <code>true</code> whether to show, otherwise <code>false</code>. + * @param doShow <code>true</code> whether to show, otherwise <code>false</code> */ void init(final boolean doShow) { final CSettings settings = CSettings.getInstance(IGUIConstants.APP_NAME); @@ -306,8 +306,8 @@ } /** - * Returns whether selection would be from a pickmap (otherwise it would be from the archlist). - * @return <code>true</code> if selection would be from a pickmap, <code>false</code> for the archlist. + * Returns whether a pickmap is active. + * @return <code>true</code> if a pickmap is active, <code>false</code> if the archlist is active */ public boolean isPickmapActive() { return pickmapActive; @@ -323,12 +323,12 @@ } /** - * Returns the highlighted Archetype / GameObject. - * @return the active arch in the left-side panel. - * This can either be a Archetype from the archlist, or - * a custom GameObject from a pickmap. - * IMPORTANT: The returned GameObject is not a clone. A copy - * must be generated before inserting such an arch to the map. + * Returns the active arch in the left-side panel. + * This can either be a default arch from the archlist, or + * a custom arch from a pickmap. + * IMPORTANT: The returned GameObject is not a clone. A copy + * must be generated before inserting such an arch to the map. + * @return the active arch in the left-side panel */ public GameObject getArchPanelHighlight() { @@ -360,7 +360,7 @@ /** * Returns the JTabbedPane with all pickmaps. - * @return The JTabbedPane with all pickmaps. + * @return the JTabbedPane with all pickmaps */ public JTabbedPane getPickmapPanel() { return pickmapPanel; @@ -395,7 +395,7 @@ /** * Sets the enabled state of the tab pane for Archetypes. - * @param tabPaneEnabled <code>true</code> to enable tab pane, <code>false</code> to disable it. + * @param tabPaneEnabled <code>true</code> to enable tab pane, <code>false</code> to disable it */ public void setTabPaneEnabled(final boolean tabPaneEnabled) { archPanel.setTabPaneEnabled(tabPaneEnabled); @@ -462,7 +462,7 @@ } /** - * Refreshes the state of menu items and toolbar buttons. + * Refresh the state of menu items and toolbar buttons. * Beware!! Executing this function eats up a lot of time! * Avoid using it whenever possible. */ @@ -476,7 +476,7 @@ refresh3(); } - /** Refreshes the map arch panel (bottom window). */ + /** Refresh the map arch panel (bottom window). */ void refreshMapArchPanel() { mapArchPanel.refresh(); } @@ -492,7 +492,7 @@ aSave.setEnabled(state && mainControl.isPlainSaveEnabled()); } - /** Refreshes the state of the menu only. */ + /** Refresh the state of the menu only. */ public void refreshMenus() { // TODO: This method shouldn't really be invoked. // Each action should be setEnabled() individually as needed. @@ -531,7 +531,7 @@ /** * Removes (closes) the level view. - * @param mapView the map view to be removed (closed). + * @param mapView the map view to be removed (closed) */ void removeLevelView(final MapViewIFrame mapView) { if (!mapViews.contains(mapView)) { @@ -576,9 +576,9 @@ /** * Shows the given message in the UI. - * @param strTitle The title of the message. - * @param strMessage The message to be shown. - * @param messageType Type of message (see JOptionPane constants), defines icon used + * @param strTitle the title of the message + * @param strMessage the message to be shown + * @param messageType type of message (see JOptionPane constants), defines icon used */ public void showMessage(final String strTitle, final String strMessage, final int messageType) { JOptionPane.showMessageDialog(this, strMessage, strTitle, messageType); @@ -591,9 +591,9 @@ /** * Shows the given confirmation message in the UI. The message * is a yes/no option. - * @param strTitle The title of the message. - * @param strMessage The message to be shown. - * @return Ture if the user agrees, false if user disagrees. + * @param strTitle the title of the message + * @param strMessage the message to be shown + * @return <code>true</code> if the user agrees, <code>false</code> if user disagrees */ public boolean askConfirm(final String strTitle, final String strMessage) { return JOptionPane.showConfirmDialog(this, strMessage, strTitle, JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE) == JOptionPane.YES_OPTION; @@ -655,7 +655,7 @@ /** * Sets the given level view as the current one. - * @param view The new current level view. + * @param view the new current level view */ public void setCurrentLevelView(final MapViewIFrame view) { mapViews.remove(view); @@ -676,7 +676,7 @@ /** * Notifies that the level views focus is lost it is inserted * as the second in line to the level view vector. - * @param view The level view who lost the focus. + * @param view the level view who lost the focus */ public void levelViewFocusLostNotify(final MapViewIFrame view) { @@ -689,7 +689,7 @@ /** * Notifies that the given level view is now set as the current one. - * @param view The new current level view. + * @param view the new current level view */ public void levelViewFocusGainedNotify(final MapViewIFrame view) { @@ -743,7 +743,7 @@ } /** - * Rebuild the "window" menu. + * Rebuild the window menu. */ private void rebuildWindowMenu() { final JMenu menuWindow = (JMenu) ACTION_FACTORY.find(getJMenuBar(), "window"); @@ -761,7 +761,7 @@ } /** - * Rebuild the "look and feel" menu entries in the view menu. + * Rebuild the look and feel menu entries in the view menu. */ private void rebuildLookAndFeelMenuEntries() { final JMenu menuView = (JMenu) ACTION_FACTORY.find(getJMenuBar(), "view"); Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -241,8 +241,8 @@ } /** - * Returns the selected GameObject within this list (currently selected square). - * @return The selected GameObject within this list. + * Return the currently selected GameObject within this list (currently selected MapSquare). + * @return the currently selected GameObject */ @Nullable public GameObject getMapTileSelection() { return (GameObject) list.getSelectedValue(); Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -69,7 +69,9 @@ /** The current active pickmap ontop. */ private MapControl currentPickMap; - /** Creates a PickmapPanel. */ + /** + * Create a CPickmapPanel. + */ public CPickmapPanel() { mainControl = CMainControl.getInstance(); instance = this; @@ -78,16 +80,16 @@ } /** - * Returns the singleton instance of this class. - * @return The singleton instance of this class. + * Return the singleton instance of this class. + * @return the singleton instance of this class */ public static CPickmapPanel getInstance() { return instance; } /** - * Returns whether the loading process of pickmaps is complete and at least one pickmap is available. - * @return <code>true</code> if pickmaps are loaded, otherwise <code>false</code> + * Return whether loading of pickmaps is complete and at least one pickmap is available. + * @return <code>true</code> if loading of pickmaps is complete and at least one pickmap is available, otherwise <code>false</code> * @todo check whether this method returns <code>true</code> or <code>false</code> if the loading process is complete but no pickmaps are availbale. */ public boolean isLoadComplete() { @@ -95,15 +97,17 @@ } /** - * Returns the currently active pickmap. + * Return the currently active pickmap. * If there is no currently active pickmap, this method returns <code>null</code>. - * @return Currently active pickmap or <code>null</code> if there are no pickmaps. + * @return the currently active pickmap or <code>null</code> if there is no pickmap */ public MapControl getCurrentPickmap() { return currentPickMap; } - /** Load all pickmaps and build the pickmap-panel in the process. */ + /** + * Load all pickmaps and build the pickmap-panel. + */ public void loadPickmaps() { // the main-panel for pickmaps: tabpane = mainControl.getMainView().getPickmapPanel(); @@ -311,7 +315,7 @@ /** * Add the ArchNPickChangeListener to the panel containing both - * arcglist and pickmaps. + * archlist and pickmaps. * @param pane the left-side panel * @todo this method's name is a Bad Thing */ @@ -355,7 +359,7 @@ private int selectedIndex; // current state of selection /** - * Create a new ArchNPickChangeListener. + * Create an ArchNPickChangeListener. * @param mainView the main view * @param pane the JTabbedPane containing both archlist and pickmaps */ Modified: trunk/crossfire/src/cfeditor/CopyBuffer.java =================================================================== --- trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/CopyBuffer.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -39,8 +39,7 @@ /** * This class manages the cut/copy/paste actions in maps. The data is stored in - * an ordinary but invisible map-object. The CopyBuffer instance is currently - * attached to CMainControl. + * an ordinary but invisible map-object. * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ public final class CopyBuffer { Modified: trunk/crossfire/src/cfeditor/MapViewIFrame.java =================================================================== --- trunk/crossfire/src/cfeditor/MapViewIFrame.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/MapViewIFrame.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -207,7 +207,7 @@ } /** - * Returns the Action for selecting this window. + * Return the Action for selecting this window. * @return the Action for selecting this window */ public WindowAction getWindowAction() { Modified: trunk/crossfire/src/cfeditor/MultiPositionData.java =================================================================== --- trunk/crossfire/src/cfeditor/MultiPositionData.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/MultiPositionData.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -41,10 +41,10 @@ private static final Logger log = Logger.getLogger(MultiPositionData.class); - /** Number of rows and columns in the array. */ + /** Number of columns in the array. */ public static final int X_DIM = 34; - /** Number of rows and columns in the array. */ + /** Number of rows in the array. */ public static final int Y_DIM = 16; private static MultiPositionData instance = null; @@ -120,7 +120,7 @@ log.info("Loaded multipart position data from '" + IGUIConstants.ARCHDEF_FILE + "'"); } } catch (final IOException e) { - /* TODO ignore (really?) */ + // FIXME either do something or DOCUMENT TO IGNORE ME } } Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -109,7 +109,7 @@ /** * Returns whether this frame has been fully built. - * @return <code>true</code> when if this frame has been fully built, otherwise <code>false</code>. + * @return <code>true</code> if this frame has been fully built, otherwise <code>false</code> */ public static boolean isBuilt() { return instance != null && instance.isBuilt; Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -368,9 +368,9 @@ /** * A popup is opened and the user can create a new scripting event - * which gets attached to this arch. - * @param panelList JList from the MapArchPanel (script tab) which displays the events - * @param arch GameObject that's name should be used for creating a reasonable default script name. + * which gets attached to this gameObject. + * @param panelList JList from the MapArchPanel (script tab) which displays the events + * @param arch GameObject that's name should be used for creating a reasonable default script name */ public void addEventScript(final JList panelList, final GameObject arch) { final String archName = arch.getBestName(); Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -365,7 +365,7 @@ } /** - * Construct the Combo box for arrays of "list data" (this is used for LIST). + * Construct the Combo box for arrays of "list data" (this is used for ArchAttribType.LIST). * @param attr list attribute * @param listData List with list items and corresponding values, that means the types are altering: String,Integer * @return the completed <code>JComboBox</code> Modified: trunk/daimonin/src/daieditor/CFArchAttrib.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -74,7 +74,9 @@ private String section; // name of the section this attribute is in - /** Constructor. */ + /** + * Create a CFArchAttrib. + */ public CFArchAttrib() { nameOld = ""; nameNew = ""; Modified: trunk/daimonin/src/daieditor/CFArchTypeList.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -87,7 +87,6 @@ private final CFArchType defaultArchType = new CFArchType(null); // contains default type private final List<CFArchType> archTypeList = new ArrayList<CFArchType>(); // All but the default ArchType - // spell info: /** * Table with CAttribBitmask objects (value) accessible by name (key). Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -1237,7 +1237,7 @@ /** * Browse first through the default arch list and attach map arches to it * then browse through the face list and try to find the pictures. - * @param objects List of GameObjects to collect. + * @param objects List of GameObjects to collect * @param uri URI they were read from (for error messages). */ public void collectTempList(final List<GameObject> objects, final String uri) { Modified: trunk/daimonin/src/daieditor/CMainView.java =================================================================== --- trunk/daimonin/src/daieditor/CMainView.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/CMainView.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -202,7 +202,7 @@ * @param prefs Preferences * @param defwidth default width * @param defheight default height - * @return Center panel. + * @return center panel */ private JPanel createCenterPanel(final Preferences prefs, final int defwidth, final int defheight) { final JPanel centerPanel = new JPanel(new BorderLayout()); @@ -257,7 +257,7 @@ /** * Returns whether a pickmap is active. - * @return <code>true</code> if a pickmap is active, <code>false</code> if the archlist is active. + * @return <code>true</code> if a pickmap is active, <code>false</code> if the archlist is active */ public boolean isPickmapActive() { return pickmapActive; @@ -274,7 +274,7 @@ * a custom arch from a pickmap. * IMPORTANT: The returned GameObject is not a clone. A copy * must be generated before inserting such an arch to the map. - * @return the active arch in the left-side panel. + * @return the active arch in the left-side panel */ @Nullable public GameObject getArchPanelHighlight() { @@ -309,7 +309,7 @@ * custom arches from a pickmap. * IMPORTANT: The returned GameObject list contains no clone. A copy * must be generated before inserting such arches to the map. - * @return the selected arches in the left-side panel. + * @return the selected arches in the left-side panel */ @Nullable public List<GameObject> getArchPanelSelection() { @@ -339,7 +339,7 @@ /** * Returns the JTabbedPane with all pickmaps. - * @return The JTabbedPane with all pickmaps. + * @return the JTabbedPane with all pickmaps */ public JTabbedPane getPickmapPanel() { return pickmapPanel; @@ -369,7 +369,7 @@ /** * Sets the enabled state of the tab pane for Archetypes. - * @param tabPaneEnabled <code>true</code> to enable tab pane, <code>false</code> to disable it. + * @param tabPaneEnabled <code>true</code> to enable tab pane, <code>false</code> to disable it */ public void setTabPaneEnabled(final boolean tabPaneEnabled) { archPanel.setTabPaneEnabled(tabPaneEnabled); @@ -435,7 +435,7 @@ } /** - * Refreshes the state of menu items and toolbar buttons. + * Refresh the state of menu items and toolbar buttons. * Beware!! Executing this function eats up a lot of time! * Avoid using it whenever possible. */ @@ -457,7 +457,7 @@ aRevert.setEnabled(state); } - /** Refreshes the state of the menu only. */ + /** Refresh the state of the menu only. */ public void refreshMenus() { // TODO: This method shouldn't really be invoked. // Each action should be setEnabled() individually as needed. @@ -484,7 +484,7 @@ /** * Removes (closes) the level view. - * @param mapView the map view to be removed (closed). + * @param mapView the map view to be removed (closed) */ public void removeLevelView(final MapViewIFrame mapView) { assert mapViews.contains(mapView); @@ -580,7 +580,7 @@ /** * Sets the given level view as the current one. - * @param view The new current level view. + * @param view the new current level view */ public void setCurrentLevelView(final MapViewIFrame view) { mapViews.remove(view); @@ -607,7 +607,7 @@ /** * Notifies that the level views focus is lost it is inserted * as the second in line to the level view vector. - * @param view The level view who lost the focus. + * @param view the level view who lost the focus */ public void levelViewFocusLostNotify(final MapViewIFrame view) { @@ -620,7 +620,7 @@ /** * Notifies that the given level view is now set as the current one. - * @param view The new current level view. + * @param view the new current level view */ public void levelViewFocusGainedNotify(final MapViewIFrame view) { @@ -667,7 +667,7 @@ /** * Update the recent menu. - * @param recents Current recents. + * @param recents current recents */ public void updateRecent(final List<CMainControl.Recent> recents) { final JMenu recentMenu = (JMenu) ACTION_FACTORY.find(getJMenuBar(), "recent"); @@ -677,7 +677,9 @@ } } - /** Rebuilds the window menu. */ + /** + * Rebuild the window menu. + */ private void rebuildWindowMenu() { final JMenu menuWindow = (JMenu) ACTION_FACTORY.find(getJMenuBar(), "window"); menuWindow.removeAll(); Modified: trunk/daimonin/src/daieditor/CMapTileList.java =================================================================== --- trunk/daimonin/src/daieditor/CMapTileList.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/CMapTileList.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -280,8 +280,8 @@ } /** - * Returns the currently selected GameObject within this list (currently selected MapSquare). - * @return The currently selected GameObject. + * Return the currently selected GameObject within this list (currently selected MapSquare). + * @return the currently selected GameObject */ public GameObject getMapTileSelection() { return (GameObject) list.getSelectedValue(); Modified: trunk/daimonin/src/daieditor/CPickmapPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/CPickmapPanel.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -68,7 +68,7 @@ private MapControl currentPickMap; /** - * Creates a CPickmapPanel. + * Create a CPickmapPanel. */ public CPickmapPanel() { mainControl = CMainControl.getInstance(); @@ -78,31 +78,31 @@ } /** - * Returns the Singleton instance of this class. - * @return The Singleton instance of this class. + * Return the singleton instance of this class. + * @return the singleton instance of this class */ public static CPickmapPanel getInstance() { return instance; } /** - * Returns whether loading of pickmaps is complete and at least one pickmap is available. - * @return <code>true</code> if loading of pickmaps is complete and at least one pickmap is available, otherwise <code>false</code>. + * Return whether loading of pickmaps is complete and at least one pickmap is available. + * @return <code>true</code> if loading of pickmaps is complete and at least one pickmap is available, otherwise <code>false</code> */ public boolean isLoadComplete() { return loadComplete; } /** - * Returns the currently active pickmap (is on top). - * @return The currently active pickmap or <code>null</code> if there is no pickmap. + * Return the currently active pickmap (is on top). + * @return the currently active pickmap or <code>null</code> if there is no pickmap */ public MapControl getCurrentPickmap() { return currentPickMap; } /** - * Loads all pickmaps and builds the pickmap-panel. + * Load all pickmaps and build the pickmap-panel. */ public void loadPickmaps() { // the main-panel for pickmaps: @@ -343,8 +343,8 @@ } /** - * Add the ArchNPickChangeListener to the panel containing both. - * arcglist and pickmaps. + * Add the ArchNPickChangeListener to the panel containing both + * archlist and pickmaps. * @param pane the left-side panel * @todo this method's name is a Bad Thing */ @@ -390,7 +390,7 @@ private int selectedIndex; // current state of selection /** - * Creates an ArchNPickChangeListener. + * Create an ArchNPickChangeListener. * @param mainView the main view * @param pane the JTabbedPane containing both archlist and pickmaps */ Modified: trunk/daimonin/src/daieditor/IGUIConstants.java =================================================================== --- trunk/daimonin/src/daieditor/IGUIConstants.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/IGUIConstants.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -40,7 +40,7 @@ /** * Internal version number of the included online-documentation. * Increasing the number causes an automated popup of the docu - * when users upgrade their editor and run for the first time + * when users upgrade their editor and run for the first time. */ int DOCU_VERSION = 1; Modified: trunk/daimonin/src/daieditor/MapViewIFrame.java =================================================================== --- trunk/daimonin/src/daieditor/MapViewIFrame.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/MapViewIFrame.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -141,8 +141,8 @@ } /** - * Returns the Action for selecting this Window. - * @return The Action for selecting this Window. + * Return the Action for selecting this window. + * @return the Action for selecting this window */ public WindowAction getWindowAction() { return windowAction; @@ -152,7 +152,7 @@ return view; } - /** Action class for selecting this Window. */ + /** Action class for selecting this window. */ public final class WindowAction extends AbstractAction { /** Constructor. */ Modified: trunk/daimonin/src/daieditor/MultiPositionData.java =================================================================== --- trunk/daimonin/src/daieditor/MultiPositionData.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/MultiPositionData.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -79,7 +79,7 @@ try { final Dimension d = new Dimension(); final Point p = new Point(); - int yp = 0; // y-index in the data array + int yp = 0; // y-index in the data array // read the whole file line by line for (String line; (line = reader.readLine()) != null;) { Modified: trunk/daimonin/src/daieditor/ReplaceDialog.java =================================================================== --- trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/ReplaceDialog.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -115,7 +115,7 @@ /** * Returns whether this frame has been fully built. - * @return <code>true</code> if this frame has been fully built, otherwise <code>false</code>. + * @return <code>true</code> if this frame has been fully built, otherwise <code>false</code> */ public static boolean isBuilt() { return instance != null && instance.isBuilt; Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -241,7 +241,7 @@ } /** - * Try to create a reasonable default script name for lazy users :-). + * Try to create a reasonable default script name for lazy users. * @param archName the best suitable name for the arch (see GameObject.getBestName()) * @return a nice default script name without whitespaces */ @@ -324,8 +324,8 @@ /** * A popup is opened and the user can create a new scripting event * which gets attached to this gameObject. - * @param panelList JList from the MapArchPanel (script tab) which displays the events - * @param gameObject GameObject to add event to. + * @param panelList JList from the MapArchPanel (script tab) which displays the events + * @param gameObject GameObject to add event to * @return <code>true</code> if a script was added, <code>false</code> if the user cancelled */ public boolean addEventScript(final JList panelList, final GameObject gameObject) { Modified: trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-12-15 21:06:55 UTC (rev 1082) +++ trunk/daimonin/src/daieditor/gameobject/ArchetypeSet.java 2006-12-15 22:01:25 UTC (rev 1083) @@ -81,7 +81,7 @@ private List<File> animFiles; /** - * Create the GameObject stack. + * Create the ArchetypeSet. * @param mainControl reference to CMainControl */ public ArchetypeSet(final CMainControl mainControl) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 21:06:57
|
Revision: 1082 http://svn.sourceforge.net/gridarta/?rev=1082&view=rev Author: akirschbaum Date: 2006-12-15 13:06:55 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Unify code. Modified Paths: -------------- trunk/daimonin/src/daieditor/CArchPanelPan.java Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:56:44 UTC (rev 1081) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 21:06:55 UTC (rev 1082) @@ -75,8 +75,6 @@ private final JComboBox comboBox; - private int comboCounter; - /** The popup menu for the arch lists to bring up the editor. */ // This looks unused, but don't remove it. It will be used in future. private final JPopupMenu menu = createListPopupMenu(); @@ -87,7 +85,6 @@ CArchPanelPan(final CArchPanel controlPanel, final CMainControl mainControl) { this.mainControl = mainControl; archPanel = controlPanel; - comboCounter = 0; setLayout(new BorderLayout()); panelDesktop = new JPanel(); @@ -203,7 +200,7 @@ setEnabled(false); comboBox.addItem(name); setEnabled(true); - return comboCounter++; + return comboBox.getItemCount() - 1; } JPanel getPanel() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 20:56:44
|
Revision: 1081 http://svn.sourceforge.net/gridarta/?rev=1081&view=rev Author: akirschbaum Date: 2006-12-15 12:56:44 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Speed up archetype panel implementation. Modified Paths: -------------- trunk/daimonin/src/daieditor/CArchPanelPan.java Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:50:10 UTC (rev 1080) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:56:44 UTC (rev 1081) @@ -33,7 +33,9 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import javax.swing.DefaultListCellRenderer; import javax.swing.DefaultListModel; import javax.swing.ImageIcon; @@ -62,8 +64,8 @@ /** Controller of this subview. */ private final CMainControl mainControl; - /** List of index-archetype name pairs. */ - private List<PanelEntry> archList = new ArrayList<PanelEntry>(); + /** Maps index to list of archetype names. */ + private Map<Integer, ArrayList<String>> archLists = new HashMap<Integer, ArrayList<String>>(); private final JList theList; @@ -178,7 +180,16 @@ * @param index index of subdir where to add */ public void addArchPanelArch(final String archetypeName, final int index) { - archList.add(new PanelEntry(index, archetypeName)); + final ArrayList<String> tmp = archLists.get(index); + final ArrayList<String> archList; + if (tmp == null) { + archList = new ArrayList<String>(); + archLists.put(index, archList); + } else { + archList = tmp; + } + + archList.add(archetypeName); } /** @@ -203,39 +214,22 @@ final int index = comboBox.getSelectedIndex(); model.removeAllElements(); - for (PanelEntry p : archList) { - if (index >= 0) { - if (index == 0) { - model.addElement(p.getName()); - } else { - if (index == p.getIndex()) { - model.addElement(p.getName()); - } + if (index == 0) { + for (final List<String> archList : archLists.values()) { + for (final String archName : archList) { + model.addElement(archName); } } + } else if (index > 0) { + final List<String> archList = archLists.get(index); + if (archList != null) { + for (final String archName : archList) { + model.addElement(archName); + } + } } } - public static final class PanelEntry { - - private int index; - - private String archName; - - public PanelEntry(final int i, final String name) { - index = i; - archName = name; - } - - public int getIndex() { - return index; - } - - public String getName() { - return archName; - } - } - /** Cell Renderer for rendering cells in the ArchPanelPan. */ private final class MyCellRenderer extends DefaultListCellRenderer { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 20:50:10
|
Revision: 1080 http://svn.sourceforge.net/gridarta/?rev=1080&view=rev Author: akirschbaum Date: 2006-12-15 12:50:10 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Whitespace change. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanelPan.java Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-15 20:48:49 UTC (rev 1079) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-15 20:50:10 UTC (rev 1080) @@ -180,8 +180,7 @@ model.addElement(archName); } } - } - else if (index > 0) { + } else if (index > 0) { final List<String> archList = archLists.get(index); if (archList != null) { for (final String archName : archList) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 20:48:48
|
Revision: 1079 http://svn.sourceforge.net/gridarta/?rev=1079&view=rev Author: akirschbaum Date: 2006-12-15 12:48:49 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Remove unused method. Modified Paths: -------------- trunk/daimonin/src/daieditor/CArchPanelPan.java Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:45:23 UTC (rev 1078) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:48:49 UTC (rev 1079) @@ -199,10 +199,6 @@ return panelDesktop; } - public List<PanelEntry> getPanelEntries() { - return archList; - } - void showArchList() { final int index = comboBox.getSelectedIndex(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 20:45:23
|
Revision: 1078 http://svn.sourceforge.net/gridarta/?rev=1078&view=rev Author: akirschbaum Date: 2006-12-15 12:45:23 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Unify code. Modified Paths: -------------- trunk/daimonin/src/daieditor/CArchPanel.java trunk/daimonin/src/daieditor/CArchPanelPan.java Modified: trunk/daimonin/src/daieditor/CArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanel.java 2006-12-15 20:36:27 UTC (rev 1077) +++ trunk/daimonin/src/daieditor/CArchPanel.java 2006-12-15 20:45:23 UTC (rev 1078) @@ -57,7 +57,7 @@ private final ToolSelectorPane toolSelectorPane = new ToolSelectorPane(); /** - * Name of the selected arch. + * Name of the selected archetype. * @serial include */ private String selectedArch; @@ -92,8 +92,8 @@ // archAndPickPane is the panel containing both archpanel and pickmaps archAndPickPane = new JTabbedPane(SwingConstants.TOP); - archAndPickPane.addTab(" Arch List ", tabDesktop); - archAndPickPane.addTab(" Pickmaps ", mainControl.getMainView().getPickmapPanel()); + archAndPickPane.addTab("Arch List", tabDesktop); + archAndPickPane.addTab("Pickmaps", mainControl.getMainView().getPickmapPanel()); // this listener informs the mainview which panel is active: archlist or pickmaps? CPickmapPanel.getInstance().addArchNPickChangeListener(archAndPickPane); @@ -138,8 +138,8 @@ return selectedPanel.addArchPanelCombo(name); } - public void addArchPanelArch(final String archname, final int index) { - selectedPanel.addArchPanelArch(archname, index); + public void addArchPanelArch(final String archetypeName, final int index) { + selectedPanel.addArchPanelArch(archetypeName, index); } /** @@ -179,7 +179,7 @@ this.selectedArch = selectedArch; } - void refresh() { + public void refresh() { archQuickPanel.refresh(); repaint(); } Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:36:27 UTC (rev 1077) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:45:23 UTC (rev 1078) @@ -62,7 +62,7 @@ /** Controller of this subview. */ private final CMainControl mainControl; - /** List of index-archname pairs. */ + /** List of index-archetype name pairs. */ private List<PanelEntry> archList = new ArrayList<PanelEntry>(); private final JList theList; @@ -71,7 +71,7 @@ private final JPanel panelDesktop; - private final JComboBox jbox; + private final JComboBox comboBox; private int comboCounter; @@ -91,7 +91,7 @@ panelDesktop = new JPanel(); panelDesktop.setLayout(new BorderLayout()); - jbox = new JComboBox(); + comboBox = new JComboBox(); model = new DefaultListModel(); theList = new JList(model); @@ -99,13 +99,13 @@ theList.setBackground(IGUIConstants.BG_COLOR); final JScrollPane scrollPane = new JScrollPane(theList); panelDesktop.add(scrollPane, BorderLayout.CENTER); - panelDesktop.add(jbox, BorderLayout.NORTH); + panelDesktop.add(comboBox, BorderLayout.NORTH); scrollPane.setAutoscrolls(true); scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - jbox.setAutoscrolls(true); + comboBox.setAutoscrolls(true); - jbox.addActionListener(new ActionListener() { + comboBox.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { showArchList(); } @@ -174,16 +174,23 @@ /** * Add this arch to list of (this) Jlist list. - * @param archname name of the arch to add + * @param archetypeName name of the archetype to add * @param index index of subdir where to add */ - public void addArchPanelArch(final String archname, final int index) { - archList.add(new PanelEntry(index, archname)); + public void addArchPanelArch(final String archetypeName, final int index) { + archList.add(new PanelEntry(index, archetypeName)); } - int addArchPanelCombo(final String name) { + /** + * Add a new category to the combo box. + * + * @param name the name of the combo box to create + * + * @return the combo box index + */ + public int addArchPanelCombo(final String name) { setEnabled(false); - jbox.addItem(name); + comboBox.addItem(name); setEnabled(true); return comboCounter++; } @@ -197,7 +204,7 @@ } void showArchList() { - final int index = jbox.getSelectedIndex(); + final int index = comboBox.getSelectedIndex(); model.removeAllElements(); for (PanelEntry p : archList) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 20:36:29
|
Revision: 1077 http://svn.sourceforge.net/gridarta/?rev=1077&view=rev Author: akirschbaum Date: 2006-12-15 12:36:27 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Simplify CArchPanel/CArchPanelPan implementation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CArchPanelPan.java Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 20:11:50 UTC (rev 1076) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 20:36:27 UTC (rev 1077) @@ -57,7 +57,7 @@ private final transient CMainControl mainControl; /** - * Name of the selected arch. + * Name of the selected archetype. * @serial include */ private String selectedArch; @@ -74,9 +74,6 @@ /** The data/view of selected objects in tab panel. */ private final CArchQuickView archQuickPanel; - /** List of arch panels. */ - private static List<PanelNode> panelNodeList = new ArrayList<PanelNode>(); - /** The active panel. */ private CArchPanelPan selectedPanel; @@ -95,21 +92,19 @@ // archAndPickPane is the panel containing both archpanel and pickmaps archAndPickPane = new JTabbedPane(SwingConstants.TOP); - archAndPickPane.addTab(" Arch List ", tabDesktop); - archAndPickPane.addTab(" Pickmaps ", mainControl.getMainView().getPickmapPanel()); + archAndPickPane.addTab("Arch List", tabDesktop); + archAndPickPane.addTab("Pickmaps", mainControl.getMainView().getPickmapPanel()); // this listener informs the mainview which panel is active: archlist or pickmaps? CPickmapPanel.getInstance().addArchNPickChangeListener(archAndPickPane); - splitPane = new GSplitPane(JSplitPane.VERTICAL_SPLIT, archAndPickPane, archQuickPanel); - // calculate default value in case there is no settings file final Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); final CSettings settings = CSettings.getInstance(IGUIConstants.APP_NAME); final int divLocation = Integer.parseInt(settings.getProperty(ARCHPANEL_LOCATION_KEY, String.valueOf((int) (0.77 * 0.9 * screen.getHeight())))); + splitPane = new GSplitPane(JSplitPane.VERTICAL_SPLIT, archAndPickPane, archQuickPanel); splitPane.setDividerLocation(divLocation); - splitPane.setDividerSize(5); add(splitPane, BorderLayout.CENTER); } @@ -148,19 +143,18 @@ } public void addPanel(final String name) { - final PanelNode newnode = new PanelNode(new CArchPanelPan(this, mainControl), name); + final CArchPanelPan newnode = new CArchPanelPan(this, mainControl); // insert new panels in alphabetical order int i; for (i = 0; i < tabDesktop.getTabCount() && name.compareToIgnoreCase(tabDesktop.getTitleAt(i)) > 0; i++) { ; } - panelNodeList.add(i, newnode); - tabDesktop.insertTab(name, null, newnode.data.getPanel(), null, i); + tabDesktop.insertTab(name, null, newnode, null, i); // careful: during the build process we are setting 'selectedPanel' // in spite of the fact that this panel might *not* actually be selected - selectedPanel = newnode.data; + selectedPanel = newnode; } /** @@ -169,25 +163,28 @@ * setting and make sure the arch list is properly drawn. */ public void finishBuildProcess() { - final Component sel = tabDesktop.getSelectedComponent(); - for (final PanelNode node : panelNodeList) { - if (node.data.getPanel() == sel) { - if (node.data != null) { - selectedPanel = node.data; + selectedPanel = (CArchPanelPan) tabDesktop.getSelectedComponent(); + if (selectedPanel != null) { + selectedPanel.showArchList(); + } + + // we must set the list of the selected list depend on combo selection + tabDesktop.addChangeListener(new ChangeListener() { + public void stateChanged(final ChangeEvent e) { + final JTabbedPane tabbedPane = (JTabbedPane) e.getSource(); + selectedPanel = (CArchPanelPan) tabDesktop.getComponentAt(tabbedPane.getSelectedIndex()); + if (selectedPanel != null) { selectedPanel.showArchList(); } - break; } - } + }); // we must set the list of the selected list depend on combo selection tabDesktop.addChangeListener(new ChangeListener() { public void stateChanged(final ChangeEvent e) { final JTabbedPane tabbedPane = (JTabbedPane) e.getSource(); - setSelectedArch(null); - final PanelNode node = panelNodeList.get(tabbedPane.getSelectedIndex()); - selectedPanel = node.getData(); + selectedPanel = (CArchPanelPan) tabDesktop.getComponentAt(tabbedPane.getSelectedIndex()); if (selectedPanel != null) { selectedPanel.showArchList(); } @@ -195,7 +192,7 @@ }); } - void appExitNotify() { + public void appExitNotify() { final CSettings settings = CSettings.getInstance(IGUIConstants.APP_NAME); settings.setProperty(ARCHPANEL_LOCATION_KEY, String.valueOf(splitPane.getDividerLocation())); } @@ -216,33 +213,9 @@ this.selectedArch = selectedArch; } - void refresh() { + public void refresh() { archQuickPanel.refresh(); repaint(); } - public static final class PanelNode { - - private final CArchPanelPan data; - - /** - * Title of this node. - */ - private final String title; - - public PanelNode(final CArchPanelPan data, final String title) { - this.data = data; - this.title = title; - } - - public String getTitle() { - return title; - } - - public CArchPanelPan getData() { - return data; - } - - } // class PanelNode - } // class CArchPanel Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-15 20:11:50 UTC (rev 1076) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-15 20:36:27 UTC (rev 1077) @@ -33,7 +33,9 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import javax.swing.DefaultListCellRenderer; import javax.swing.DefaultListModel; import javax.swing.JComboBox; @@ -41,6 +43,8 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JViewport; +import javax.swing.ListModel; +import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import org.apache.log4j.Logger; @@ -56,40 +60,33 @@ /** Controller of this subview. */ private final CMainControl mainControl; - /** List of index-archetype name pairs. */ - private List<PanelEntry> archList = new ArrayList<PanelEntry>(); + /** Maps index to list of archetype names. */ + private Map<Integer, ArrayList<String>> archLists = new HashMap<Integer, ArrayList<String>>(); private final JList theList; private final DefaultListModel model; - private final JPanel panelDesktop; - private final JComboBox comboBox; - private int comboCounter; - private final CArchPanel archPanel; /* Build Panel */ CArchPanelPan(final CArchPanel controlPanel, final CMainControl mainControl) { + super(new BorderLayout()); this.mainControl = mainControl; archPanel = controlPanel; - comboCounter = 0; - setLayout(new BorderLayout()); - panelDesktop = new JPanel(); - panelDesktop.setLayout(new BorderLayout()); - comboBox = new JComboBox(); model = new DefaultListModel(); theList = new JList(model); theList.setCellRenderer(new MyCellRenderer()); theList.setBackground(IGUIConstants.BG_COLOR); + theList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); final JScrollPane scrollPane = new JScrollPane(theList); - panelDesktop.add(scrollPane, BorderLayout.CENTER); - panelDesktop.add(comboBox, BorderLayout.NORTH); + add(scrollPane, BorderLayout.CENTER); + add(comboBox, BorderLayout.NORTH); scrollPane.setAutoscrolls(true); scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); @@ -106,17 +103,6 @@ showArchListObject(e.getFirstIndex()); } }); - - // listening for mouse-click events in the ArchPanel list - theList.addMouseListener(new MouseAdapter() { - @Override public void mousePressed(final MouseEvent e) { - // 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 (mainControl.getCurrentMap() != null && mainControl.getCurrentMap().getMapViewFrame() != null) { - mainControl.getCurrentMap().getMapViewFrame().requestFocus(); // focus to mapview - } - } - }); } /** @@ -140,22 +126,17 @@ return archetype; } - public void showArchListObject(int index) { + private void showArchListObject(int index) { GameObject archetype = null; - - if (index != -1) { - try { - final String archetypeName = theList.getSelectedValue().toString(); + String archetypeName = null; + if (0 <= index && index < model.getSize()) { + archetypeName = (String) theList.getSelectedValue(); + if (archetypeName != null) { archetype = mainControl.getArchetypeSet().getArchetype(archetypeName); - } catch (final NullPointerException e) { - /* - log.info("NullPointerException in showArchListObject()!", e); - This happens in JDK 1.4 when you select an arch in panel A, - then select Panel B, then Panel A again. (why??) - */ - } catch (final NumberFormatException e) { + archPanel.setSelectedArch(archetypeName); } } + mainControl.setStatusText(archetypeName == null ? "" : archetypeName); mainControl.showArchPanelQuickObject(archetype); // send it to quick view } @@ -165,59 +146,49 @@ * @param index index of subdir where to add */ public void addArchPanelArch(final String archetypeName, final int index) { - archList.add(new PanelEntry(index, archetypeName)); + final ArrayList<String> tmp = archLists.get(index); + final ArrayList<String> archList; + if (tmp == null) { + archList = new ArrayList<String>(); + archLists.put(index, archList); + } else { + archList = tmp; + } + + archList.add(archetypeName); } - int addArchPanelCombo(final String name) { - setEnabled(false); + /** + * Add a new category to the combo box. + * + * @param name the name of the combo box to create + * + * @return the combo box index + */ + public int addArchPanelCombo(final String name) { comboBox.addItem(name); - setEnabled(true); - return comboCounter++; + return comboBox.getItemCount() - 1; } - JPanel getPanel() { - return panelDesktop; - } - - public List<PanelEntry> getPanelEntries() { - return archList; - } - - void showArchList() { + public void showArchList() { final int index = comboBox.getSelectedIndex(); model.removeAllElements(); - for (PanelEntry p : archList) { - if (index >= 0) { - if (index == 0) { - model.addElement(p.getName()); - } else { - if (index == p.getIndex()) { - model.addElement(p.getName()); - } + if (index == 0) { + for (final List<String> archList : archLists.values()) { + for (final String archName : archList) { + model.addElement(archName); } } } - } - - public static final class PanelEntry { - - private int index; - - private String archName; - - public PanelEntry(final int i, final String name) { - index = i; - archName = name; + else if (index > 0) { + final List<String> archList = archLists.get(index); + if (archList != null) { + for (final String archName : archList) { + model.addElement(archName); + } + } } - - public int getIndex() { - return index; - } - - public String getName() { - return archName; - } } /** Cell Renderer for rendering cells in the ArchPanelPan. */ @@ -234,10 +205,6 @@ final ArchetypeSet archetypeSet = mainControl.getArchetypeSet(); final String archetypeName = (String) value; final GameObject archetype = archetypeSet.getArchetype(archetypeName); - if (isSelected) { // XXX it is not a good idea to query the selection information at this place. - archPanel.setSelectedArch(archetypeName); - mainControl.setStatusText(archetypeName); - } assert archetype != null : "Archetype not found: " + archetypeName; setText(archetypeName); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 20:11:50
|
Revision: 1076 http://svn.sourceforge.net/gridarta/?rev=1076&view=rev Author: akirschbaum Date: 2006-12-15 12:11:50 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Remove unused methods. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanel.java trunk/daimonin/src/daieditor/CArchPanel.java trunk/daimonin/src/daieditor/CArchPanelPan.java Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 20:09:11 UTC (rev 1075) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 20:11:50 UTC (rev 1076) @@ -113,10 +113,6 @@ add(splitPane, BorderLayout.CENTER); } - public static List<PanelNode> getPanelNodeList() { - return panelNodeList; - } - /** Move the pickmap panel in front of the default-archpanel. */ public void movePickmapPanelToFront() { if (archAndPickPane != null && archAndPickPane.getTabCount() > 1) { Modified: trunk/daimonin/src/daieditor/CArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanel.java 2006-12-15 20:09:11 UTC (rev 1075) +++ trunk/daimonin/src/daieditor/CArchPanel.java 2006-12-15 20:11:50 UTC (rev 1076) @@ -119,10 +119,6 @@ }); } - public static List<PanelNode> getPanelNodeList() { - return panelNodeList; - } - /** Move the pickmap panel in front of the default-archpanel. */ public void movePickmapPanelToFront() { if (archAndPickPane != null && archAndPickPane.getTabCount() > 1) { Modified: trunk/daimonin/src/daieditor/CArchPanelPan.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:09:11 UTC (rev 1075) +++ trunk/daimonin/src/daieditor/CArchPanelPan.java 2006-12-15 20:11:50 UTC (rev 1076) @@ -196,28 +196,6 @@ return archList; } - /** - * Returns an array with category numbers as Strings. - * This is only needed when arche collection is run, so we want - * to know to which categories the arches belong to. - * @return an array of the categories of all arches in this panel - */ - public String[] getListCategoryArray() { - final String[] catList = new String[archList.size()]; - - int i = 0; - for (final PanelEntry p : archList) { - try { - final int index = p.getIndex(); - catList[i++] = jbox.getItemAt(index).toString().trim(); - } catch (final NullPointerException e) { - log.warn("Nullpointer in getListCategoryArray()!", e); - } - } - - return catList; - } - void showArchList() { final int index = jbox.getSelectedIndex(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 20:09:11
|
Revision: 1075 http://svn.sourceforge.net/gridarta/?rev=1075&view=rev Author: akirschbaum Date: 2006-12-15 12:09:11 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Invert sorting order of archetype panels. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CArchPanel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-12-15 19:59:26 UTC (rev 1074) +++ trunk/crossfire/ChangeLog 2006-12-15 20:09:11 UTC (rev 1075) @@ -1,5 +1,7 @@ 2006-12-15 Andreas Kirschbaum + * Invert sorting order of archetype panels. + * Fix #1613731 (Arch list tabs sometimes blank). 2006-12-13 Andreas Kirschbaum Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 19:59:26 UTC (rev 1074) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 20:09:11 UTC (rev 1075) @@ -156,7 +156,7 @@ // insert new panels in alphabetical order int i; - for (i = 0; i < tabDesktop.getTabCount() && name.compareToIgnoreCase(tabDesktop.getTitleAt(i)) < 0; i++) { + for (i = 0; i < tabDesktop.getTabCount() && name.compareToIgnoreCase(tabDesktop.getTitleAt(i)) > 0; i++) { ; } panelNodeList.add(i, newnode); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 19:59:26
|
Revision: 1074 http://svn.sourceforge.net/gridarta/?rev=1074&view=rev Author: akirschbaum Date: 2006-12-15 11:59:26 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Remove unused method. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanelPan.java Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-15 19:50:03 UTC (rev 1073) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-15 19:59:26 UTC (rev 1074) @@ -183,28 +183,6 @@ return archList; } - /** - * Returns an array with category numbers as Strings. - * This is only needed when arche collection is run, so we want - * to know to which categories the arches belong to. - * @return an array of the categories of all arches in this panel - */ - public String[] getListCategoryArray() { - final String[] catList = new String[archList.size()]; - - int i = 0; - for (final PanelEntry p : archList) { - try { - final int index = p.getIndex(); - catList[i++] = comboBox.getItemAt(index).toString().trim(); - } catch (final NullPointerException e) { - log.warn("Nullpointer in getListCategoryArray()!", e); - } - } - - return catList; - } - void showArchList() { final int index = comboBox.getSelectedIndex(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 19:50:04
|
Revision: 1073 http://svn.sourceforge.net/gridarta/?rev=1073&view=rev Author: akirschbaum Date: 2006-12-15 11:50:03 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Rename variable names. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CArchPanelPan.java Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 18:55:17 UTC (rev 1072) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 19:50:03 UTC (rev 1073) @@ -136,8 +136,8 @@ return selectedPanel.addArchPanelCombo(name); } - public void addArchPanelArch(final String archname, final int index) { - selectedPanel.addArchPanelArch(archname, index); + public void addArchPanelArch(final String archetypeName, final int index) { + selectedPanel.addArchPanelArch(archetypeName, index); } /** Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-15 18:55:17 UTC (rev 1072) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-15 19:50:03 UTC (rev 1073) @@ -56,7 +56,7 @@ /** Controller of this subview. */ private final CMainControl mainControl; - /** List of index-archname pairs. */ + /** List of index-archetype name pairs. */ private List<PanelEntry> archList = new ArrayList<PanelEntry>(); private final JList theList; @@ -65,7 +65,7 @@ private final JPanel panelDesktop; - private final JComboBox jbox; + private final JComboBox comboBox; private int comboCounter; @@ -81,7 +81,7 @@ panelDesktop = new JPanel(); panelDesktop.setLayout(new BorderLayout()); - jbox = new JComboBox(); + comboBox = new JComboBox(); model = new DefaultListModel(); theList = new JList(model); @@ -89,13 +89,13 @@ theList.setBackground(IGUIConstants.BG_COLOR); final JScrollPane scrollPane = new JScrollPane(theList); panelDesktop.add(scrollPane, BorderLayout.CENTER); - panelDesktop.add(jbox, BorderLayout.NORTH); + panelDesktop.add(comboBox, BorderLayout.NORTH); scrollPane.setAutoscrolls(true); scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); - jbox.setAutoscrolls(true); + comboBox.setAutoscrolls(true); - jbox.addActionListener(new ActionListener() { + comboBox.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { showArchList(); } @@ -145,8 +145,8 @@ if (index != -1) { try { - final String archname = theList.getSelectedValue().toString(); - archetype = mainControl.getArchetypeSet().getArchetype(archname); + final String archetypeName = theList.getSelectedValue().toString(); + archetype = mainControl.getArchetypeSet().getArchetype(archetypeName); } catch (final NullPointerException e) { /* log.info("NullPointerException in showArchListObject()!", e); @@ -161,16 +161,16 @@ /** * Add this arch to list of (this) Jlist list. - * @param archname name of the arch to add + * @param archetypeName name of the archetype to add * @param index index of subdir where to add */ - public void addArchPanelArch(final String archname, final int index) { - archList.add(new PanelEntry(index, archname)); + public void addArchPanelArch(final String archetypeName, final int index) { + archList.add(new PanelEntry(index, archetypeName)); } int addArchPanelCombo(final String name) { setEnabled(false); - jbox.addItem(name); + comboBox.addItem(name); setEnabled(true); return comboCounter++; } @@ -196,7 +196,7 @@ for (final PanelEntry p : archList) { try { final int index = p.getIndex(); - catList[i++] = jbox.getItemAt(index).toString().trim(); + catList[i++] = comboBox.getItemAt(index).toString().trim(); } catch (final NullPointerException e) { log.warn("Nullpointer in getListCategoryArray()!", e); } @@ -206,7 +206,7 @@ } void showArchList() { - final int index = jbox.getSelectedIndex(); + final int index = comboBox.getSelectedIndex(); model.removeAllElements(); for (PanelEntry p : archList) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-15 18:55:17
|
Revision: 1072 http://svn.sourceforge.net/gridarta/?rev=1072&view=rev Author: akirschbaum Date: 2006-12-15 10:55:17 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Fix #1613731 (Arch list tabs sometimes blank). Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CArchPanel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-12-14 22:20:20 UTC (rev 1071) +++ trunk/crossfire/ChangeLog 2006-12-15 18:55:17 UTC (rev 1072) @@ -1,3 +1,7 @@ +2006-12-15 Andreas Kirschbaum + + * Fix #1613731 (Arch list tabs sometimes blank). + 2006-12-13 Andreas Kirschbaum * Make Analyze menu work. Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-14 22:20:20 UTC (rev 1071) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-15 18:55:17 UTC (rev 1072) @@ -111,20 +111,6 @@ splitPane.setDividerLocation(divLocation); splitPane.setDividerSize(5); add(splitPane, BorderLayout.CENTER); - - // we must set the list of the selected list depend on combo selection - tabDesktop.addChangeListener(new ChangeListener() { - public void stateChanged(final ChangeEvent e) { - final JTabbedPane tabbedPane = (JTabbedPane) e.getSource(); - - setSelectedArch(null); - final PanelNode node = panelNodeList.get(tabbedPane.getSelectedIndex()); - selectedPanel = node.getData(); - if (selectedPanel != null) { - selectedPanel.showArchList(); - } - } - }); } public static List<PanelNode> getPanelNodeList() { @@ -168,13 +154,12 @@ public void addPanel(final String name) { final PanelNode newnode = new PanelNode(new CArchPanelPan(this, mainControl), name); - panelNodeList.add(newnode); - // insert new panels in alphabetical order int i; for (i = 0; i < tabDesktop.getTabCount() && name.compareToIgnoreCase(tabDesktop.getTitleAt(i)) < 0; i++) { ; } + panelNodeList.add(i, newnode); tabDesktop.insertTab(name, null, newnode.data.getPanel(), null, i); // careful: during the build process we are setting 'selectedPanel' @@ -198,6 +183,20 @@ break; } } + + // we must set the list of the selected list depend on combo selection + tabDesktop.addChangeListener(new ChangeListener() { + public void stateChanged(final ChangeEvent e) { + final JTabbedPane tabbedPane = (JTabbedPane) e.getSource(); + + setSelectedArch(null); + final PanelNode node = panelNodeList.get(tabbedPane.getSelectedIndex()); + selectedPanel = node.getData(); + if (selectedPanel != null) { + selectedPanel.showArchList(); + } + } + }); } void appExitNotify() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 22:20:20
|
Revision: 1071 http://svn.sourceforge.net/gridarta/?rev=1071&view=rev Author: akirschbaum Date: 2006-12-14 14:20:20 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Fix typo. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CFArchType.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java trunk/daimonin/src/daieditor/CFArchType.java Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-14 22:11:23 UTC (rev 1070) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-14 22:20:20 UTC (rev 1071) @@ -177,17 +177,17 @@ } tabDesktop.insertTab(name, null, newnode.data.getPanel(), null, i); - // careful: during the build proccess we are setting 'selectedPanel' + // careful: during the build process we are setting 'selectedPanel' // in spite of the fact that this panel might *not* actually be selected selectedPanel = newnode.data; } /** - * After the build proccess is completed and the panels have + * After the build process is completed and the panels have * been fully constructed, we must correct the 'selectedPanel' * setting and make sure the arch list is properly drawn. */ - public void finishBuildProccess() { + public void finishBuildProcess() { final Component sel = tabDesktop.getSelectedComponent(); for (final PanelNode node : panelNodeList) { if (node.data.getPanel() == sel) { Modified: trunk/crossfire/src/cfeditor/CFArchType.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchType.java 2006-12-14 22:11:23 UTC (rev 1070) +++ trunk/crossfire/src/cfeditor/CFArchType.java 2006-12-14 22:20:20 UTC (rev 1071) @@ -227,7 +227,7 @@ } } - // now get all children and proccess them in order: + // now get all children and process them in order: children = root.getChildren(); boolean inSection; String section = "?"; Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-12-14 22:11:23 UTC (rev 1070) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-12-14 22:20:20 UTC (rev 1071) @@ -318,8 +318,8 @@ archPanel.movePickmapPanelToFront(); } - public void finishArchPanelBuildProccess() { - archPanel.finishBuildProccess(); + public void finishArchPanelBuildProcess() { + archPanel.finishBuildProcess(); } /** Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-12-14 22:11:23 UTC (rev 1070) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2006-12-14 22:20:20 UTC (rev 1071) @@ -145,7 +145,7 @@ mainControl.setStatusText("Sorting..."); connectFaces(); // attach faces to arches mainControl.setTabPaneEnabled(true); - mainControl.getMainView().finishArchPanelBuildProccess(); + mainControl.getMainView().finishArchPanelBuildProcess(); System.gc(); // load the autojoin lists Modified: trunk/daimonin/src/daieditor/CFArchType.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchType.java 2006-12-14 22:11:23 UTC (rev 1070) +++ trunk/daimonin/src/daieditor/CFArchType.java 2006-12-14 22:20:20 UTC (rev 1071) @@ -224,7 +224,7 @@ } } - // now get all children and proccess them in order: + // now get all children and process them in order: for (final Element elem : new NodeListIterator<Element>(root, ELEMENT_NODE)) { // attribute directly in type element if (elem.getNodeName().equalsIgnoreCase(XML_ATTRIBUTE)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 22:11:24
|
Revision: 1070 http://svn.sourceforge.net/gridarta/?rev=1070&view=rev Author: akirschbaum Date: 2006-12-14 14:11:23 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Unify comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/messages.properties trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/MapViewIFrame.java Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-12-14 22:08:07 UTC (rev 1069) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-12-14 22:11:23 UTC (rev 1070) @@ -5,6 +5,7 @@ # <name>.<image set name>.111 availableImageSets=base +########## # Dialogs collectArchesNotReady.title=Arches still loading Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-14 22:08:07 UTC (rev 1069) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-14 22:11:23 UTC (rev 1070) @@ -1705,7 +1705,6 @@ if (activePickmap == null) { ACTION_FACTORY.showMessageDialog(mainView, "revertPickmapNoPickmaps"); } else { - // ask for confirmation if (!activePickmap.isLevelChanged() || ACTION_FACTORY.showQuestionDialog(mainView, "confirmRevertPickmap", activePickmap.getMapFileName())) { final File mfile = activePickmap.getMapFile(); // store file if (!mfile.exists()) { Modified: trunk/daimonin/src/daieditor/MapViewIFrame.java =================================================================== --- trunk/daimonin/src/daieditor/MapViewIFrame.java 2006-12-14 22:08:07 UTC (rev 1069) +++ trunk/daimonin/src/daieditor/MapViewIFrame.java 2006-12-14 22:11:23 UTC (rev 1070) @@ -66,7 +66,7 @@ /** * Constructs a level view. * @param mainControl the main controller - * @param mapControl the controller of this view + * @param mapControl the controller of this view * @param number Each view of a level will get a number */ public MapViewIFrame(final CMainControl mainControl, final MapControl mapControl, final int number) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 22:08:07
|
Revision: 1069 http://svn.sourceforge.net/gridarta/?rev=1069&view=rev Author: akirschbaum Date: 2006-12-14 14:08:07 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Remove redundant catch clause. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-14 22:06:24 UTC (rev 1068) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-14 22:08:07 UTC (rev 1069) @@ -40,7 +40,6 @@ import java.awt.Point; import java.awt.Rectangle; import java.io.File; -import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -959,8 +958,6 @@ } finally { mapFileEncoder.close(); } - } catch (final FileNotFoundException e) { - ACTION_FACTORY.showMessageDialog(mainView, "encodeMapFile", file, e.getMessage()); } catch (final IOException e) { ACTION_FACTORY.showMessageDialog(mainView, "encodeMapFile", file, e.getMessage()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 22:06:23
|
Revision: 1068 http://svn.sourceforge.net/gridarta/?rev=1068&view=rev Author: akirschbaum Date: 2006-12-14 14:06:24 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Remove unused code. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-14 22:03:54 UTC (rev 1067) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-14 22:06:24 UTC (rev 1068) @@ -952,7 +952,6 @@ * @param mapModel MapModel to save */ public void encodeMapFile(@NotNull final File file, final MapModel mapModel) { - final String fname = file.getAbsolutePath(); try { final CMapWriter mapFileEncoder = new CMapWriter(file); try { Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-14 22:03:54 UTC (rev 1067) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-14 22:06:24 UTC (rev 1068) @@ -618,21 +618,6 @@ } /** - * A new edit type was selected from the view menu. Now - * we activate the new type and calculate it for each GameObject on - * each map where this type has not yet been used. - * @param newType new selected edit type (should not be more than one) - */ - void selectEditType(final int newType) { - // calculate the new type for all opened maps: - for (final MapControl level : levels) { - level.addEditType(newType); // calculate new type - } - - setTileEdit(newType); // activate the new type for all views - } - - /** * Return the map of a file if the file is opened. * @param path path to map file * @return map of file <var>path</var> or <code>null</code> if map not open This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 22:03:54
|
Revision: 1067 http://svn.sourceforge.net/gridarta/?rev=1067&view=rev Author: akirschbaum Date: 2006-12-14 14:03:54 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Unify (remove) static import statement. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-14 22:00:37 UTC (rev 1066) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-14 22:03:54 UTC (rev 1067) @@ -27,7 +27,6 @@ import static daieditor.CMainView.MAP_TILE_LIST_BOTTOM_DEFAULT; import static daieditor.CMainView.MAP_TILE_LIST_BOTTOM_KEY; -import static daieditor.IGUIConstants.TILE_EDIT_NONE; import daieditor.gameobject.ArchetypeParser; import daieditor.gameobject.ArchetypeSet; import daieditor.gameobject.GameObject; @@ -615,7 +614,7 @@ * @return <code>true</code> if a tileEdit value is set, otherwise <code>false</code>. */ public boolean isTileEditSet() { - return (tileEdit & TILE_EDIT_NONE) == 0 && tileEdit != 0; + return (tileEdit & IGUIConstants.TILE_EDIT_NONE) == 0 && tileEdit != 0; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 22:00:37
|
Revision: 1066 http://svn.sourceforge.net/gridarta/?rev=1066&view=rev Author: akirschbaum Date: 2006-12-14 14:00:37 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Unify declaration order and comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-14 21:49:25 UTC (rev 1065) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-14 22:00:37 UTC (rev 1066) @@ -106,6 +106,9 @@ /** The Animation Objects. */ private AnimationObjects animationObjects; + /** The Face Objects. */ + private FaceObjects faceObjects; + // icons for the map and arch pictures. private static ImageIcon mapSelIcon; @@ -174,8 +177,6 @@ /** Pickmaps cannot be edited while lockedPickmaps is true. */ private boolean lockAllPickmaps = false; - private FaceObjects faceObjects; - /** Constructs the main controller and its model and view. */ public CMainControl() { instance = this; @@ -193,6 +194,14 @@ } /** + * Get the Face Objects. + * @return faceObjects + */ + public FaceObjects getFaceObjects() { + return faceObjects; + } + + /** * Initialises this main controller. * @param doShow <code>true</code> for showing, <code>false</code> for not showing. */ @@ -285,14 +294,6 @@ } /** - * Get the Face Objects. - * @return faceObjects - */ - public FaceObjects getFaceObjects() { - return faceObjects; - } - - /** * Set the mapiew to show tiles of the given type. * (If no tileEdit is set, everything is displayed) * @param v tileedit bitmask of types to show Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-14 21:49:25 UTC (rev 1065) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-14 22:00:37 UTC (rev 1066) @@ -382,7 +382,9 @@ return faceObjects; } - /** Initialises this main controller. */ + /** + * Initialises this main controller. + */ void init() { // Get the current directory currentDir = new File(System.getProperty("user.dir")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 21:49:25
|
Revision: 1065 http://svn.sourceforge.net/gridarta/?rev=1065&view=rev Author: akirschbaum Date: 2006-12-14 13:49:25 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Use ActionFactory to create main menu. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/CScriptView.java trunk/crossfire/src/cfeditor/IGUIConstants.java trunk/crossfire/src/cfeditor/MapViewIFrame.java trunk/crossfire/src/cfeditor/action.properties 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/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapControl.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/crossfire/src/cfeditor/parameter/FilterParameterView.java Added Paths: ----------- trunk/crossfire/resource/icons/development/Jar16.gif trunk/crossfire/resource/icons/general/About16.gif trunk/crossfire/resource/icons/general/Copy16.gif trunk/crossfire/resource/icons/general/Cut16.gif trunk/crossfire/resource/icons/general/Delete16.gif trunk/crossfire/resource/icons/general/Help16.gif trunk/crossfire/resource/icons/general/New16.gif trunk/crossfire/resource/icons/general/Paste16.gif trunk/crossfire/resource/icons/general/Preferences16.gif trunk/crossfire/resource/icons/general/Properties16.gif trunk/crossfire/resource/icons/general/Refresh16.gif trunk/crossfire/resource/icons/general/Remove16.gif trunk/crossfire/resource/icons/general/Replace16.gif trunk/crossfire/resource/icons/general/Save16.gif trunk/crossfire/resource/icons/general/SaveAs16.gif Removed Paths: ------------- trunk/crossfire/resource/icons/ImportTilesetSmallIcon.gif trunk/crossfire/resource/icons/NewLevelSmallIcon.gif trunk/crossfire/resource/icons/NextWindowSmallIcon.gif trunk/crossfire/resource/icons/OpenLevelSmallIcon.gif trunk/crossfire/resource/icons/PrevWindowSmallIcon.gif trunk/crossfire/resource/icons/RedoSmallIcon.gif trunk/crossfire/resource/icons/RemoveTilesetSmallIcon.gif trunk/crossfire/resource/icons/UndoSmallIcon.gif trunk/crossfire/src/cfeditor/CMainMenu.java Deleted: trunk/crossfire/resource/icons/ImportTilesetSmallIcon.gif =================================================================== (Binary files differ) Deleted: trunk/crossfire/resource/icons/NewLevelSmallIcon.gif =================================================================== (Binary files differ) Deleted: trunk/crossfire/resource/icons/NextWindowSmallIcon.gif =================================================================== (Binary files differ) Deleted: trunk/crossfire/resource/icons/OpenLevelSmallIcon.gif =================================================================== (Binary files differ) Deleted: trunk/crossfire/resource/icons/PrevWindowSmallIcon.gif =================================================================== (Binary files differ) Deleted: trunk/crossfire/resource/icons/RedoSmallIcon.gif =================================================================== (Binary files differ) Deleted: trunk/crossfire/resource/icons/RemoveTilesetSmallIcon.gif =================================================================== (Binary files differ) Deleted: trunk/crossfire/resource/icons/UndoSmallIcon.gif =================================================================== (Binary files differ) Added: trunk/crossfire/resource/icons/development/Jar16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/development/Jar16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/About16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/About16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Copy16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Copy16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Cut16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Cut16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Delete16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Delete16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Help16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Help16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/New16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/New16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Paste16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Paste16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Preferences16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Preferences16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Properties16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Properties16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Refresh16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Refresh16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Remove16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Remove16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Replace16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Replace16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/Save16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/Save16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/crossfire/resource/icons/general/SaveAs16.gif =================================================================== (Binary files differ) Property changes on: trunk/crossfire/resource/icons/general/SaveAs16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/crossfire/src/cfeditor/CFilterControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CFilterControl.java 2006-12-14 21:36:04 UTC (rev 1064) +++ trunk/crossfire/src/cfeditor/CFilterControl.java 2006-12-14 21:49:25 UTC (rev 1065) @@ -16,10 +16,9 @@ import cfeditor.filter.NamedFilterListener; import cfeditor.gameobject.GameObject; import cfeditor.map.MapControl; -import cfeditor.menu.BasicMenuEntry; -import javax.swing.JComponent; import javax.swing.JMenu; -import org.jetbrains.annotations.Nullable; +import javax.swing.JMenuItem; +import net.sf.japi.swing.ActionFactory; /** * Control for filters. @@ -42,6 +41,9 @@ //TODO allow implementation of own filter public final class CFilterControl implements NamedFilterListener, ConfigListener { + /** Action Factory to create Actions. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); + public static final int MAX_HIGHLIGHT = 3; private final boolean filterOut = false; @@ -83,8 +85,16 @@ return defaultFilter; } - public BasicMenuEntry createMenuEntry() { - return new FilterControlMenuEntry(); + public void createMenuEntries(final JMenu menu) { + final JMenuItem menuItem = filterList.createMenuEntry(filterOutConfig); + menuItem.setText("Filter view"); + menu.add(menuItem); + menu.addSeparator(); + for (int i = 0; i < MAX_HIGHLIGHT; i++) { + final JMenuItem menuItem2 = filterList.createMenuEntry(highLightConfig[i]); + menuItem2.setText("Highlight " + i); + menu.add(menuItem2); + } } /* ---------- use part --------------*/ @@ -140,45 +150,6 @@ } } - private final class FilterControlMenuEntry extends BasicMenuEntry { - - FilterControlMenuEntry() { - super("<<set me>>"); - } - - @Override protected void update() { - // nothing to do - } - - @Override protected void updateItem(final JComponent item) { - // nothing to do - } - - @Override public JComponent getMenuBarComponent() { - final JMenu menu = new JMenu(getName()); - final BasicMenuEntry outEntry = filterList.createMenuEntry(filterOutConfig); - outEntry.setName("Filter view"); - final JComponent out = outEntry.getMenuItemComponent(); - menu.add(out); - menu.addSeparator(); - for (int i = 0; i < MAX_HIGHLIGHT; i++) { - final BasicMenuEntry bme = filterList.createMenuEntry(highLightConfig[i]); - bme.setName("Highlight " + i); - final JComponent hl = bme.getMenuItemComponent(); - menu.add(hl); - } - return menu; - } - - @Override public JComponent getMenuItemComponent() { - return getMenuBarComponent(); - } - - @Override @Nullable public JComponent getToolbarComponent() { - return null; - } - } - public boolean addFilter(final String name, final Filter f) { return filterList.addFilter(name, f); } Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-14 21:36:04 UTC (rev 1064) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-14 21:49:25 UTC (rev 1065) @@ -90,7 +90,7 @@ public static final String LOAD_ARCH_COLL = "loadArchFromCollection"; - public static final String PICKMAPS_LOCKED = "pickmapsLocked"; + private static final String PICKMAPS_LOCKED = "pickmapsLocked"; /** Preferences key for language. */ public static final String PREFS_LANGUAGE = "language"; @@ -180,8 +180,8 @@ public CMainControl() { instance = this; archetypeSet = new ArchetypeSet(this); - mainView = new CMainView(this); scriptControl = new CScriptController(this); + mainView = new CMainView(); } /** @@ -215,7 +215,7 @@ if (autoPopupDocu) { // do an automated help popup because the docu version has increased // (people won't notice the docu otherwise - nobody expects a docu in opensource) - openHelpWindow(); + onlineHelp(); autoPopupDocu = false; } @@ -248,8 +248,15 @@ } } + /** Show about dialog. */ + @ActionMethod public void about() { + mainView.about(); + } + /** Collect crossfire archetypes. */ public void collectArches() { + getMainView().update(getMainView().getGraphics()); + if (archetypeSet.getLoadStatus() != ArchetypeSet.LoadStatus.COMPLETE) { // must not collect arches while arch stack not complete ACTION_FACTORY.showMessageDialog(mainView, "collectArchesNotReady"); @@ -267,6 +274,11 @@ collector.start(); } + /** Collect Spells. */ + @ActionMethod public void collectSpells() { + getTypeList().importSpellsWanted(this); + } + /** View Treasure Lists. */ @ActionMethod public void viewTreasurelists() { CFTreasureListTree.getInstance().showDialog(); @@ -324,7 +336,7 @@ * each map where this type has not yet been used. * @param newType new selected edit type (should not be more than one) */ - void selectEditType(final int newType) { + private void selectEditType(final int newType) { // calculate the new type for all opened maps: for (final MapControl level : levels) { level.addEditType(newType); // calculate new type @@ -333,15 +345,88 @@ setTileEdit(newType); // activate the new type for all views } + public boolean isAutoJoin() { + return autoJoin; + } + public void setAutoJoin(final boolean autoJoin) { this.autoJoin = autoJoin; } - public boolean isAutoJoin() { - return autoJoin; + private void setShow(final boolean show, final int editType) { + if (show) { + selectEditType(editType); + } else { + unsetTileEdit(editType); + } + refreshCurrentMap(); } - public void openHelpWindow() { + public boolean isShowMonster() { + return isTileEdit(IGUIConstants.TILE_EDIT_MONSTER); + } + + public void setShowMonster(final boolean showMonster) { + setShow(showMonster, IGUIConstants.TILE_EDIT_MONSTER); + } + + public boolean isShowExit() { + return isTileEdit(IGUIConstants.TILE_EDIT_EXIT); + } + + public void setShowExit(final boolean showExit) { + setShow(showExit, IGUIConstants.TILE_EDIT_EXIT); + } + + public boolean isShowBackground() { + return isTileEdit(IGUIConstants.TILE_EDIT_BACKGROUND); + } + + public void setShowBackground(final boolean showBackground) { + setShow(showBackground, IGUIConstants.TILE_EDIT_BACKGROUND); + } + + public boolean isShowDoor() { + return isTileEdit(IGUIConstants.TILE_EDIT_DOOR); + } + + public void setShowDoor(final boolean showDoor) { + setShow(showDoor, IGUIConstants.TILE_EDIT_DOOR); + } + + public boolean isShowWall() { + return isTileEdit(IGUIConstants.TILE_EDIT_WALL); + } + + public void setShowWall(final boolean showWall) { + setShow(showWall, IGUIConstants.TILE_EDIT_WALL); + } + + public boolean isShowEquipment() { + return isTileEdit(IGUIConstants.TILE_EDIT_EQUIP); + } + + public void setShowEquipment(final boolean showEquipment) { + setShow(showEquipment, IGUIConstants.TILE_EDIT_EQUIP); + } + + public boolean isShowTreasure() { + return isTileEdit(IGUIConstants.TILE_EDIT_TREASURE); + } + + public void setShowTreasure(final boolean showTreasure) { + setShow(showTreasure, IGUIConstants.TILE_EDIT_TREASURE); + } + + public boolean isShowConnected() { + return isTileEdit(IGUIConstants.TILE_EDIT_CONNECTED); + } + + public void setShowConnected(final boolean showConnected) { + setShow(showConnected, IGUIConstants.TILE_EDIT_CONNECTED); + } + + public void onlineHelp() { mainView.openHelpWindow(); } @@ -1110,17 +1195,14 @@ } } - boolean isTileShow() { + public boolean isTileShow() { return currentMap.isTileShow(); } - void setTileShow() { - // TODO: implement this + public void setTileShow(final boolean tileShow) { + currentMap.setTileShow(tileShow); } - void toggleShowTiles() { - } - private PreferencesGroup prefsGroup; public void options() { @@ -1225,6 +1307,36 @@ } } + /** Action method for entering the north map. */ + public void enterNorthMap() { + enterTileWanted(IGUIConstants.NORTH); + } + + /** Action method for entering the east map. */ + public void enterEastMap() { + enterTileWanted(IGUIConstants.EAST); + } + + /** Action method for entering the south map. */ + public void enterSouthMap() { + enterTileWanted(IGUIConstants.SOUTH); + } + + /** Action method for entering the west map. */ + public void enterWestMap() { + enterTileWanted(IGUIConstants.WEST); + } + + /** Action method for entering the upper map. */ + public void enterUpperMap() { + enterTileWanted(IGUIConstants.TOP); + } + + /** Action method for entering the lower map. */ + public void enterLowerMap() { + enterTileWanted(IGUIConstants.BOTTOM); + } + /** * Try to load the map where the specified map-tile path points to. * Usually this method can only be invoked when such a path exists. @@ -1525,7 +1637,7 @@ * @return true if a level is being edited or false if not */ boolean isLevelEdited() { - return currentMap != null; + return currentMap != null && currentMap.isLevelChanged(); } /** Deleted: trunk/crossfire/src/cfeditor/CMainMenu.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainMenu.java 2006-12-14 21:36:04 UTC (rev 1064) +++ trunk/crossfire/src/cfeditor/CMainMenu.java 2006-12-14 21:49:25 UTC (rev 1065) @@ -1,1354 +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 cfeditor.gameobject.ArchetypeSet; -import cfeditor.menu.AggregateMenuLocation; -import cfeditor.menu.BasicMenuEntry; -import cfeditor.menu.CheckBoxMenuEntry; -import cfeditor.menu.LocationMenuEntry; -import cfeditor.menu.MenuGroup; -import cfeditor.menu.MenuManager; -import cfeditor.menu.SimpleMenuEntry; -import cfeditor.menu.SimpleMenuLocation; -import cfeditor.menu.MenuEntry; -import java.awt.Event; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.KeyEvent; -import java.util.List; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.KeyStroke; -import javax.swing.UIManager; - -/** - * <code>CMainMenu</code implements the main menu of the application. - * @author <a href="mailto:mic...@no...">Michael Toennies</a> - * @author <a href="mailto:and...@gm...">Andreas Vogl</a> - */ -public final class CMainMenu extends JMenuBar { - - /** Controller of this menu view. */ - private final CMainControl mainControl; - - private AggregateMenuLocation mainLocation; - - private AggregateMenuLocation currentmapLocation; - - private JMenu windowMenu; - - private SimpleMenuEntry close; - - private SimpleMenuEntry revert; - - private SimpleMenuEntry save; - - private SimpleMenuEntry saveAs; - - private SimpleMenuEntry createImg; - - private SimpleMenuEntry collectArch; - - private SimpleMenuEntry spellC; - - private SimpleMenuEntry viewTreasure; - - private CheckBoxMenuEntry autojoin; - - private CheckBoxMenuEntry gridToggle; - - private SimpleMenuEntry properties; - - private SimpleMenuEntry enterExit; - - private SimpleMenuEntry enterNorth; - - private SimpleMenuEntry enterEast; - - private SimpleMenuEntry enterWest; - - private SimpleMenuEntry enterSouth; - - private SimpleMenuEntry enterUpper; - - private SimpleMenuEntry enterLower; - - private CheckBoxMenuEntry showTiles; - - private CheckBoxMenuEntry lockPickmaps; - - private SimpleMenuEntry newPickmap; - - private SimpleMenuEntry deletePickmap; - - private SimpleMenuEntry loadPickmap; - - private SimpleMenuEntry savePickmap; - - private SimpleMenuEntry revertPickmap; - - private SimpleMenuEntry clear; - - private SimpleMenuEntry cut; - - private SimpleMenuEntry copy; - - private SimpleMenuEntry paste; - - private SimpleMenuEntry replace; - - private SimpleMenuEntry fillAbove; - - private SimpleMenuEntry fillBelow; - - private CheckBoxMenuEntry monster; - - private CheckBoxMenuEntry exit; - - private CheckBoxMenuEntry background; - - private CheckBoxMenuEntry door; - - private CheckBoxMenuEntry wall; - - private CheckBoxMenuEntry equip; - - private CheckBoxMenuEntry treasure; - - private CheckBoxMenuEntry connected; - - private JMenuItem newWindow; - - private JMenuItem closeAll; - - /*private JCheckBoxMenuItem[] m_analyze_show_filters; - private JCheckBoxMenuItem m_analyze_show_activate; - private JCheckBoxMenuItem m_analyze_show_invert; - private JMenu m_analyze_show; - private JCheckBoxMenuItem[][] m_analyze_highLight_filters; - private JCheckBoxMenuItem[] m_analyze_highLight_activate; - private JCheckBoxMenuItem[] m_analyze_highLight_invert; - private JMenu[] m_analyze_highLight;*/ - - private static final long serialVersionUID = 1491480879950551491L; - - /** - * Constructs a main menu. - * @param mainControl The controller of this main menu. - */ - CMainMenu(final CMainControl mainControl) { - this.mainControl = mainControl; // reference to main control - buildAggregates(); - buildFileMenu(); - buildEditMenu(); - buildMapMenu(); - buildPickmapsMenu(); - buildResourceMenu(); - //buildScriptMenu(); - buildAnalyzeMenu(); - buildViewMenu(); - buildBshMenu(); - buildWindowMenu(); - buildHelpMenu(); - buildCurrentMapMenu(); - } - - private void buildAggregates() { - mainLocation = new AggregateMenuLocation("main"); - final AggregateMenuLocation toolbarLocation = new AggregateMenuLocation("toolbar"); - currentmapLocation = new AggregateMenuLocation("currentmap"); - MenuManager.getMenuManager().addMenuLocation(mainLocation); - MenuManager.getMenuManager().addMenuLocation(toolbarLocation); - MenuManager.getMenuManager().addMenuLocation(currentmapLocation); - } - - private void buildCurrentMapMenu() { - currentmapLocation.addMenuEntry(save); - currentmapLocation.addMenuEntry(saveAs); - currentmapLocation.addMenuEntry(createImg); - currentmapLocation.addMenuEntry(revert); - currentmapLocation.addMenuEntry(autojoin); - currentmapLocation.addMenuEntry(properties); - currentmapLocation.addMenuEntry(fillAbove); - currentmapLocation.addMenuEntry(fillBelow); - } - - /** - * Creates the "File"-Menu. - */ - private void buildFileMenu() { - final MenuManager menuManager = MenuManager.getMenuManager(); - final SimpleMenuLocation fileMenu = new SimpleMenuLocation("main.file"); - menuManager.addMenuLocation(fileMenu); - mainLocation.addMenuLocation(fileMenu); - final LocationMenuEntry entry = new LocationMenuEntry("main.file", "File"); - menuManager.addMenuEntry("main", entry); - entry.setMnemonic('F'); - - final SimpleMenuEntry newME = new SimpleMenuEntry("New..."); - newME.setIcon(CGUIUtils.getIcon(IGUIConstants.NEW_LEVEL_SMALLICON)); - newME.setMnemonic('N'); - newME.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, Event.CTRL_MASK)); - newME.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.createNew(); - } - }); - menuManager.addMenuEntry("main.file", newME); - - final SimpleMenuEntry open = new SimpleMenuEntry("Open..."); - open.setIcon(CGUIUtils.getIcon(IGUIConstants.OPEN_LEVEL_SMALLICON)); - open.setMnemonic('O'); - open.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK)); - open.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.open(); - } - }); - menuManager.addMenuEntry("main.file", open); - - close = new SimpleMenuEntry("Close"); - close.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - close.setMnemonic('C'); - close.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F4, Event.CTRL_MASK)); - close.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.close(); - } - }); - menuManager.addMenuEntry("main.file", close); - - menuManager.addMenuEntry("main.file", MenuEntry.getSeparator()); - - save = new SimpleMenuEntry("Save"); - save.setIcon(CGUIUtils.getIcon(IGUIConstants.SAVE_LEVEL_SMALLICON)); - save.setMnemonic('S'); - save.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, Event.CTRL_MASK)); - save.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.save(); - } - }); - menuManager.addMenuEntry("main.file", save); - - saveAs = new SimpleMenuEntry("Save as..."); - saveAs.setIcon(CGUIUtils.getIcon(IGUIConstants.SAVE_LEVEL_AS_SMALLICON)); - saveAs.setMnemonic('A'); - saveAs.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, Event.CTRL_MASK)); - saveAs.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.saveAs(); - } - }); - menuManager.addMenuEntry("main.file", saveAs); - - revert = new SimpleMenuEntry("Revert"); - revert.setMnemonic('R'); - revert.setIcon(CGUIUtils.getIcon(IGUIConstants.REVERT_ICON)); - revert.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.revert(); - } - }); - menuManager.addMenuEntry("main.file", revert); - - createImg = new SimpleMenuEntry("Create image"); - createImg.setMnemonic('I'); - createImg.setIcon(CGUIUtils.getIcon(IGUIConstants.CREATE_IMAGE_SMALLICON)); - createImg.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.createImg(); - } - }); - menuManager.addMenuEntry("main.file", createImg); - - menuManager.addMenuEntry("main.file", SimpleMenuEntry.getSeparator()); - - final SimpleMenuEntry options = new SimpleMenuEntry("Options..."); - options.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - options.setMnemonic('P'); - options.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Event.ALT_MASK)); - options.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.options(); - } - }); - menuManager.addMenuEntry("main.file", options); - - menuManager.addMenuEntry("main.file", SimpleMenuEntry.getSeparator()); - - final SimpleMenuEntry exit = new SimpleMenuEntry("Exit"); - exit.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - exit.setMnemonic('X'); - exit.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.exit(); - } - }); - menuManager.addMenuEntry("main.file", exit); - add(entry.getMenuBarComponent()); - } - - /** - * Creates the "Edit"-Menu. - */ - private void buildEditMenu() { - final MenuManager menuManager = MenuManager.getMenuManager(); - final SimpleMenuLocation editMenu = new SimpleMenuLocation("main.edit"); - mainLocation.addMenuLocation(editMenu); - menuManager.addMenuLocation(editMenu); - final LocationMenuEntry entry = new LocationMenuEntry("main.edit", "Edit"); - menuManager.addMenuEntry("main", entry); - entry.setMnemonic('E'); - - // Clear: - clear = new SimpleMenuEntry("Clear"); - clear.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - clear.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.clear(); - } - }); - menuManager.addMenuEntry("main.edit", clear); - - // Cut: - cut = new SimpleMenuEntry("Cut"); - cut.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - cut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK)); - cut.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.cut(); - } - }); - menuManager.addMenuEntry("main.edit", cut); - - // Copy: - copy = new SimpleMenuEntry("Copy"); - copy.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - copy.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, Event.CTRL_MASK)); - copy.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.copy(); - } - }); - menuManager.addMenuEntry("main.edit", copy); - - // Paste: - paste = new SimpleMenuEntry("Paste"); - paste.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - paste.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK)); - paste.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.paste(); - } - }); - menuManager.addMenuEntry("main.edit", paste); - - menuManager.addMenuEntry("main.edit", MenuEntry.getSeparator()); - - // Replace: - replace = new SimpleMenuEntry("Replace"); - replace.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - replace.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, Event.CTRL_MASK)); - replace.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.replace(); - } - }); - menuManager.addMenuEntry("main.edit", replace); - - // Fill: - fillAbove = new SimpleMenuEntry("Fill Above"); - fillAbove.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - fillAbove.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK)); - fillAbove.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.fillAbove(); - } - }); - menuManager.addMenuEntry("main.edit", fillAbove); - - // Fill: - fillBelow = new SimpleMenuEntry("Fill Below"); - fillBelow.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - fillBelow.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK | Event.SHIFT_MASK)); - fillBelow.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.fillBelow(); - } - }); - menuManager.addMenuEntry("main.edit", fillBelow); - - // Random Fill: - final SimpleMenuEntry randFillAbove = new SimpleMenuEntry("Random Fill Above"); - randFillAbove.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - randFillAbove.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK)); - randFillAbove.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.randFillAbove(); - } - }); - menuManager.addMenuEntry("main.edit", randFillAbove); - - // Random Fill: - final SimpleMenuEntry randFillBelow = new SimpleMenuEntry("Random Fill Below"); - randFillBelow.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - randFillBelow.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK | Event.SHIFT_MASK)); - randFillBelow.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.randFillBelow(); - } - }); - menuManager.addMenuEntry("main.edit", randFillBelow); - - final SimpleMenuEntry garbageCollection = new SimpleMenuEntry("Run Garbage Collection"); - garbageCollection.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - garbageCollection.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.gc(); - } - }); - menuManager.addMenuEntry("main.edit", garbageCollection); - - add(entry.getMenuBarComponent()); - } - - private void buildViewMenu() { - final MenuManager menuManager = MenuManager.getMenuManager(); - final SimpleMenuLocation viewMenu = new SimpleMenuLocation("main.view"); - mainLocation.addMenuLocation(viewMenu); - menuManager.addMenuLocation(viewMenu); - final LocationMenuEntry entry = new LocationMenuEntry("main.view", "View"); - menuManager.addMenuEntry("main", entry); - entry.setMnemonic('V'); - - final CSettings settings = CSettings.getInstance(IGUIConstants.APP_NAME); - final UIManager.LookAndFeelInfo[] lafInfos = UIManager.getInstalledLookAndFeels(); - final MenuGroup group = new MenuGroup(); - //JCheckBoxMenuItem selectedMenuItem = null; - final String strSelectedLNFName = settings.getProperty(CMainView.SELECTED_LNF_KEY, - UIManager.getCrossPlatformLookAndFeelClassName()); - for (final UIManager.LookAndFeelInfo lafInfo : lafInfos) { - final CheckBoxMenuEntry menuItem = new CheckBoxMenuEntry(lafInfo.getName()); - if (strSelectedLNFName.compareTo(lafInfo.getClassName()) == 0) { - menuItem.setChecked(true); - } - - menuItem.addActionListener(new CLNFActionListener(lafInfo.getClassName())); - menuManager.addMenuEntry("main.view", menuItem); - group.add(menuItem); - } - - menuManager.addMenuEntry("main.view", MenuEntry.getSeparator()); - - menuManager.addMenuEntry("main.view", MenuEntry.getSeparator()); - - monster = new CheckBoxMenuEntry("Show Monsters"); - monster.setChecked(mainControl.isTileEdit(IGUIConstants.TILE_EDIT_MONSTER)); - monster.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (monster.isChecked()) { - mainControl.selectEditType(IGUIConstants.TILE_EDIT_MONSTER); - } else { - mainControl.unsetTileEdit(IGUIConstants.TILE_EDIT_MONSTER); - } - mainControl.refreshCurrentMap(); - } - }); - menuManager.addMenuEntry("main.view", monster); - - exit = new CheckBoxMenuEntry("Show Exits"); - exit.setChecked(mainControl.isTileEdit(IGUIConstants.TILE_EDIT_EXIT)); - exit.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (exit.isChecked()) { - mainControl.selectEditType(IGUIConstants.TILE_EDIT_EXIT); - } else { - mainControl.unsetTileEdit(IGUIConstants.TILE_EDIT_EXIT); - } - mainControl.refreshCurrentMap(); - } - }); - menuManager.addMenuEntry("main.view", exit); - - background = new CheckBoxMenuEntry("Show Background"); - background.setChecked(mainControl.isTileEdit(IGUIConstants.TILE_EDIT_BACKGROUND)); - background.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (background.isChecked()) { - mainControl.selectEditType(IGUIConstants.TILE_EDIT_BACKGROUND); - } else { - mainControl.unsetTileEdit(IGUIConstants.TILE_EDIT_BACKGROUND); - } - mainControl.refreshCurrentMap(); - } - }); - menuManager.addMenuEntry("main.view", background); - - door = new CheckBoxMenuEntry("Show Doors & Keys"); - door.setChecked(mainControl.isTileEdit(IGUIConstants.TILE_EDIT_DOOR)); - door.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (door.isChecked()) { - mainControl.selectEditType(IGUIConstants.TILE_EDIT_DOOR); - } else { - mainControl.unsetTileEdit(IGUIConstants.TILE_EDIT_DOOR); - } - mainControl.refreshCurrentMap(); - } - }); - menuManager.addMenuEntry("main.view", door); - wall = new CheckBoxMenuEntry("Show Wall"); - wall.setChecked(mainControl.isTileEdit(IGUIConstants.TILE_EDIT_WALL)); - wall.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (wall.isChecked()) { - mainControl.selectEditType(IGUIConstants.TILE_EDIT_WALL); - } else { - mainControl.unsetTileEdit(IGUIConstants.TILE_EDIT_WALL); - } - mainControl.refreshCurrentMap(); - } - }); - menuManager.addMenuEntry("main.view", wall); - equip = new CheckBoxMenuEntry("Show Equipment"); - equip.setChecked(mainControl.isTileEdit(IGUIConstants.TILE_EDIT_EQUIP)); - equip.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (equip.isChecked()) { - mainControl.selectEditType(IGUIConstants.TILE_EDIT_EQUIP); - } else { - mainControl.unsetTileEdit(IGUIConstants.TILE_EDIT_EQUIP); - } - mainControl.refreshCurrentMap(); - } - }); - menuManager.addMenuEntry("main.view", equip); - treasure = new CheckBoxMenuEntry("Show Treasure"); - treasure.setChecked(mainControl.isTileEdit(IGUIConstants.TILE_EDIT_TREASURE)); - treasure.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (treasure.isChecked()) { - mainControl.selectEditType(IGUIConstants.TILE_EDIT_TREASURE); - } else { - mainControl.unsetTileEdit(IGUIConstants.TILE_EDIT_TREASURE); - } - mainControl.refreshCurrentMap(); - } - }); - menuManager.addMenuEntry("main.view", treasure); - connected = new CheckBoxMenuEntry("Show Connected"); - connected.setChecked(mainControl.isTileEdit(IGUIConstants.TILE_EDIT_CONNECTED)); - connected.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - if (connected.isChecked()) { - mainControl.selectEditType(IGUIConstants.TILE_EDIT_CONNECTED); - } else { - mainControl.unsetTileEdit(IGUIConstants.TILE_EDIT_CONNECTED); - } - mainControl.refreshCurrentMap(); - } - }); - menuManager.addMenuEntry("main.view", connected); - menuManager.addMenuEntry("main.view", MenuEntry.getSeparator()); - final SimpleMenuEntry showAll = new SimpleMenuEntry("Reset View"); - showAll.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // set tileEdit to zero (-> show all) - mainControl.unsetTileEdit(~0); - monster.setChecked(false); - exit.setChecked(false); - background.setChecked(false); - door.setChecked(false); - wall.setChecked(false); - equip.setChecked(false); - treasure.setChecked(false); - connected.setChecked(false); - mainControl.refreshCurrentMap(); // redraw map - } - }); - menuManager.addMenuEntry("main.view", showAll); - - add(entry.getMenuBarComponent()); - } - - private void buildMapMenu() { - final SimpleMenuLocation mapMenu = new SimpleMenuLocation("main.map"); - final LocationMenuEntry entry = new LocationMenuEntry("main.map", "Map"); - final MenuManager menuManager = MenuManager.getMenuManager(); - menuManager.addMenuLocation(mapMenu); - mainLocation.addMenuLocation(mapMenu); - entry.setMnemonic('M'); - menuManager.addMenuEntry("main", entry); - - autojoin = new CheckBoxMenuEntry("Auto-Joining"); - autojoin.setMnemonic('A'); - autojoin.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_J, Event.CTRL_MASK)); - autojoin.setChecked(mainControl.isAutoJoin()); - autojoin.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // toggle autojoining state on/off - mainControl.setAutoJoin(autojoin.isChecked()); - } - }); - menuManager.addMenuEntry("main.map", autojoin); - - menuManager.addMenuEntry("main.map", MenuEntry.getSeparator()); - - gridToggle = new CheckBoxMenuEntry("Show Grid"); - gridToggle.setMnemonic('G'); - gridToggle.setChecked(mainControl.isGridVisible()); - - gridToggle.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.setGridVisible(gridToggle.isChecked()); - } - }); - menuManager.addMenuEntry("main.map", gridToggle); - - enterExit = new SimpleMenuEntry("Enter Exit"); - enterExit.setMnemonic('E'); - enterExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, Event.CTRL_MASK)); - enterExit.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.enterExit(); - } - }); - menuManager.addMenuEntry("main.map", enterExit); - menuManager.addMenuEntry("main.map", MenuEntry.getSeparator()); - - enterNorth = new SimpleMenuEntry("Enter North Map"); - enterNorth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.CTRL_MASK)); - enterNorth.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.enterTileWanted(IGUIConstants.NORTH); - } - }); - menuManager.addMenuEntry("main.map", enterNorth); - - enterEast = new SimpleMenuEntry("Enter East Map"); - enterEast.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Event.CTRL_MASK)); - enterEast.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.enterTileWanted(IGUIConstants.EAST); - } - }); - menuManager.addMenuEntry("main.map", enterEast); - - enterSouth = new SimpleMenuEntry("Enter South Map"); - enterSouth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.CTRL_MASK)); - enterSouth.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.enterTileWanted(IGUIConstants.SOUTH); - } - }); - menuManager.addMenuEntry("main.map", enterSouth); - - enterWest = new SimpleMenuEntry("Enter West Map"); - enterWest.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Event.CTRL_MASK)); - enterWest.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.enterTileWanted(IGUIConstants.WEST); - } - }); - menuManager.addMenuEntry("main.map", enterWest); - - enterUpper = new SimpleMenuEntry("Enter Upper Map"); - enterUpper.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.CTRL_MASK)); - enterUpper.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.enterTileWanted(IGUIConstants.TOP); - } - }); - menuManager.addMenuEntry("main.map", enterUpper); - - enterLower = new SimpleMenuEntry("Enter Lower Map"); - enterLower.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.CTRL_MASK)); - enterLower.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.enterTileWanted(IGUIConstants.BOTTOM); - } - }); - menuManager.addMenuEntry("main.map", enterLower); - - menuManager.addMenuEntry("main.map", MenuEntry.getSeparator()); - - showTiles = new CheckBoxMenuEntry("Show Tiles around"); - showTiles.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.toggleShowTiles(); - } - }); - menuManager.addMenuEntry("main.map", showTiles); - - menuManager.addMenuEntry("main.map", MenuEntry.getSeparator()); - properties = new SimpleMenuEntry("Map Properties"); - properties.setMnemonic('P'); - properties.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, Event.CTRL_MASK)); - properties.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.mapProperties(); - } - }); - menuManager.addMenuEntry("main.map", properties); - add(entry.getMenuBarComponent()); - } - - private void buildPickmapsMenu() { - final SimpleMenuLocation pickmapsMenu = new SimpleMenuLocation("main.pickmaps"); - final LocationMenuEntry entry = new LocationMenuEntry("main.pickmaps", "Pickmaps"); - final MenuManager menuManager = MenuManager.getMenuManager(); - mainLocation.addMenuLocation(pickmapsMenu); - menuManager.addMenuLocation(pickmapsMenu); - entry.setMnemonic('P'); - menuManager.addMenuEntry("main", entry); - - lockPickmaps = new CheckBoxMenuEntry("Lock All Pickmaps"); - lockPickmaps.setMnemonic('L'); - lockPickmaps.setChecked(Boolean.valueOf(CSettings.getInstance(IGUIConstants.APP_NAME).getProperty( - CMainControl.PICKMAPS_LOCKED, "false"))); - lockPickmaps.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // lock pickmaps - mainControl.setLockAllPickmaps(lockPickmaps.isChecked()); - newPickmap.setEnabled(!lockPickmaps.isChecked()); - - final boolean isArchLoadComplete = mainControl.getArchetypeSet().getLoadStatus() == ArchetypeSet.LoadStatus.COMPLETE; - if (isArchLoadComplete) { - deletePickmap.setEnabled(!lockPickmaps.isChecked()); - loadPickmap.setEnabled(!lockPickmaps.isChecked()); - savePickmap.setEnabled(!lockPickmaps.isChecked()); - revertPickmap.setEnabled(!lockPickmaps.isChecked()); - } else { - deletePickmap.setEnabled(false); - loadPickmap.setEnabled(false); - savePickmap.setEnabled(false); - revertPickmap.setEnabled(false); - } - - // store this in the settings - CSettings.getInstance(IGUIConstants.APP_NAME).setProperty(CMainControl.PICKMAPS_LOCKED, lockPickmaps.isChecked() ? "true" : "false"); - } - }); - menuManager.addMenuEntry("main.pickmaps", lockPickmaps); - - menuManager.addMenuEntry("main.pickmaps", MenuEntry.getSeparator()); - - newPickmap = new SimpleMenuEntry("Add New Pickmap"); - newPickmap.setMnemonic('N'); - newPickmap.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - newPickmap.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // create new pickmap - mainControl.addNewPickmap(); - } - }); - menuManager.addMenuEntry("main.pickmaps", newPickmap); - - deletePickmap = new SimpleMenuEntry("Close Active Pickmap"); - deletePickmap.setMnemonic('C'); - deletePickmap.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - deletePickmap.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // close pickmap - mainControl.closePickmap(); - } - }); - menuManager.addMenuEntry("main.pickmaps", deletePickmap); - menuManager.addMenuEntry("main.pickmaps", MenuEntry.getSeparator()); - - loadPickmap = new SimpleMenuEntry("Open Active Pickmap as Map"); - loadPickmap.setMnemonic('O'); - loadPickmap.setIcon(CGUIUtils.getIcon(IGUIConstants.EMPTY_SMALLICON)); - loadPickmap.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // load pickmap as normal map - mainControl.openPickmapMap(); - } - }); - menuManager.addMenuEntry("main.pickmaps", loadPickmap); - - savePickmap = new SimpleMenuEntry("Save Active Pickmap"); - savePickmap.setMnemonic('S'); - savePickmap.setIcon(CGUIUtils.getIcon(IGUIConstants.SAVE_LEVEL_SMALLICON)); - savePickmap.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // save pickmap - mainControl.savePickmap(); - } - }); - menuManager.addMenuEntry("main.pickmaps", savePickmap); - - revertPickmap = new SimpleMenuEntry("Revert Active Pickmap"); - revertPickmap.setMnemonic('R'); - revertPickmap.setIcon(CGUIUtils.getIcon(IGUIConstants.REVERT_ICON)); - revertPickmap.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // revert pickmap - mainControl.revertPickmap(); - } - }); - menuManager.addMenuEntry("main.pickmaps", revertPickmap); - - add(entry.getMenuBarComponent()); - } - - private void buildResourceMenu() { - final SimpleMenuLocation collectMenu = new SimpleMenuLocation("main.resources"); - final LocationMenuEntry entry = new LocationMenuEntry("main.resources", "Resources"); - final MenuManager menuManager = MenuManager.getMenuManager(); - mainLocation.addMenuLocation(collectMenu); - menuManager.addMenuLocation(collectMenu); - menuManager.addMenuEntry("main", entry); - entry.setMnemonic('R'); - - collectArch = new SimpleMenuEntry("Collect CF Arches"); - collectArch.setMnemonic('A'); - collectArch.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - //TODO fix this - //collectMenu.setPopupMenuVisible(false); - mainControl.getMainView().update(mainControl.getMainView().getGraphics()); - mainControl.collectArches(); - } - }); - menuManager.addMenuEntry("main.resources", collectArch); - - spellC = new SimpleMenuEntry("Collect Spells"); - spellC.setMnemonic('S'); - spellC.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - mainControl.getTypeList().importSpellsWanted(mainControl); - } - }); - menuManager.addMenuEntry("main.resources", spellC); - menuManager.addMenuEntry("main.resources", MenuEntry.getSeparator()); - - viewTreasure = new SimpleMenuEntry("View Treasurelists"); - viewTreasure.setMnemonic('T'); - viewTreasure.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // show the treasurelist tree - CFTreasureListTree.getInstance().showDialog(); - } - }); - menuManager.addMenuEntry("main.resources", viewTreasure); - - add(entry.getMenuBarComponent()); - } - - /*private void buildScriptMenu() { - menu_script = new JMenu("Scriptfire"); - menu_script.setMnemonic('S'); - - m_scriptMenu = new JMenuItem("under construction..."); - m_scriptMenu.setMnemonic('N'); - m_scriptMenu.addActionListener( - new ActionListener() { - public void actionPerformed(final ActionEvent event) { - } - }); - menu_script.add(m_scriptMenu); - //add(menu_script); - }*/ - - public void buildAnalyzeMenu() { - final MenuManager menuManager = MenuManager.getMenuManager(); - final CFilterControl filter = mainControl.getFilterControl(); - final BasicMenuEntry entry = filter.createMenuEntry(); - entry.setVisible(true); - entry.setMnemonic('y'); - entry.setName("Analyze"); - menuManager.addMenuEntry("main", entry); - add(entry.getMenuBarComponent()); - } - -/* - private void buildAnalyzeMenu() { - menu_analyze = new SimpleMenuLocation("main.analyze"); - final LocationMenuEntry entry = new LocationMenuEntry("main.analyze", "Analyze"); - final MenuManager menuManager = MenuManager.getMenuManager(); - mainLocation.addMenuLocation(menu_analyze); - menuManager.addMenuLocation(menu_analyze); - menuManager.addMenuEntry("main", entry); - entry.setMnemonic('y'); - final CFilterControl filter = mainControl.getFilterControl(); - m_analyze_show = new JMenu("Filter View"); - m_analyze_show.setMnemonic('v'); - m_analyze_show.setEnabled(false); - ActionListener showListener = new ActionListener() { - public void actionPerformed(final ActionEvent event) { - try {... [truncated message content] |
From: <aki...@us...> - 2006-12-14 21:36:05
|
Revision: 1064 http://svn.sourceforge.net/gridarta/?rev=1064&view=rev Author: akirschbaum Date: 2006-12-14 13:36:04 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Fix messages. Modified Paths: -------------- trunk/daimonin/src/daieditor/messages.properties trunk/daimonin/src/daieditor/messages_de.properties Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-14 21:34:40 UTC (rev 1063) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-14 21:36:04 UTC (rev 1064) @@ -213,7 +213,7 @@ fileDialog.filter.anim=Animation definitions fileDialog.filter.unignored=All supported file types -createNew.text=New +createNew.text=New... createNew.shortdescription=Create new map createNew.longdescription=Creates a new map createNew.mnemonic=N @@ -228,7 +228,7 @@ recent.text=Recent recent.shortdescription=Load a recently opened map -recent.mnemonic=R +recent.mnemonic=T recentItem.shortdescriptionformat=Opens map {0} ({1}) close.text=Close @@ -273,8 +273,8 @@ options.text=Options... options.shortdescription=Shows options options.longdescription=Shows an option dialog to change the editor settings -options.mnemonic=O -options.accel=ctrl alt pressed s +options.mnemonic=P +options.accel=ctrl alt pressed S exit.text=Exit exit.shortdescription=Exit program Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-12-14 21:34:40 UTC (rev 1063) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-12-14 21:36:04 UTC (rev 1064) @@ -181,7 +181,7 @@ fileDialog.filter.arc=Archetypdefinitionen fileDialog.filter.anim=Animationsdefinitionen -createNew.text=Neu +createNew.text=Neu... createNew.shortdescription=Erzeuge neue Karte createNew.longdescription=Erzeut eine neue Karte createNew.mnemonic=N @@ -210,7 +210,7 @@ save.accel=ctrl pressed S save.error.text=Fehler beim Speichern -saveAs.text=Speichern Als... +saveAs.text=Speichern als... saveAs.shortdescription=Karte mit neuem Namen speichern saveAs.longdescription=Speichert die Karte unter einem neuen Namen saveAs.mnemonic=A @@ -221,7 +221,7 @@ revert.shortdescription=Zuletzt gespeicherte Fassung revert.longdescription=Macht alle \xC4nderungen r\xFCckg\xE4ngig und stellt die zuletzt gespeicherte Fassung wieder her revert.mnemonic=R -revert.error.text=Fehler beim zur\xFCcksetzen +revert.error.text=Fehler beim Zur\xFCcksetzen createImg.text=Bild speichern... createImg.shortdescription=Bild der Karte speichern @@ -373,6 +373,7 @@ # Tools tools.text=Werkzeuge +tools.mnemonic=W newScript.text=Neues Script newScript.mnemonic=P @@ -459,7 +460,7 @@ onlineHelp.text=Online-Hilfe onlineHelp.mnemonic=H -onlineHelp.accel=F11 +onlineHelp.accel=F1 about.text=\xDCber... about.mnemonic=A This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 21:34:41
|
Revision: 1063 http://svn.sourceforge.net/gridarta/?rev=1063&view=rev Author: akirschbaum Date: 2006-12-14 13:34:40 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Remove unused import statement. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/ScriptManager.java Modified: trunk/crossfire/src/cfeditor/gui/ScriptManager.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/ScriptManager.java 2006-12-14 21:32:45 UTC (rev 1062) +++ trunk/crossfire/src/cfeditor/gui/ScriptManager.java 2006-12-14 21:34:40 UTC (rev 1063) @@ -17,7 +17,6 @@ import java.awt.event.ActionListener; import java.util.HashMap; import javax.swing.AbstractListModel; -import javax.swing.DefaultListSelectionModel; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JList; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 21:32:50
|
Revision: 1062 http://svn.sourceforge.net/gridarta/?rev=1062&view=rev Author: akirschbaum Date: 2006-12-14 13:32:45 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Remove unused import statement. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/ArchComboBox.java Modified: trunk/crossfire/src/cfeditor/gui/ArchComboBox.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/ArchComboBox.java 2006-12-14 21:31:37 UTC (rev 1061) +++ trunk/crossfire/src/cfeditor/gui/ArchComboBox.java 2006-12-14 21:32:45 UTC (rev 1062) @@ -20,7 +20,6 @@ import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; -import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import javax.swing.AbstractListModel; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-14 21:31:41
|
Revision: 1061 http://svn.sourceforge.net/gridarta/?rev=1061&view=rev Author: akirschbaum Date: 2006-12-14 13:31:37 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Remove unused import statement. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapTileList.java Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-13 19:22:35 UTC (rev 1060) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-14 21:31:37 UTC (rev 1061) @@ -42,7 +42,6 @@ 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-13 19:22:38
|
Revision: 1060 http://svn.sourceforge.net/gridarta/?rev=1060&view=rev Author: christianhujer Date: 2006-12-13 11:22:35 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Better handling of some == situations. Modified Paths: -------------- trunk/daimonin/src/daieditor/Updater.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/gui/DirectionLayout.java trunk/daimonin/src/daieditor/gui/prefs/GUIPrefs.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java trunk/src/app/net/sf/gridarta/help/HtmlPane.java Modified: trunk/daimonin/src/daieditor/Updater.java =================================================================== --- trunk/daimonin/src/daieditor/Updater.java 2006-12-13 19:19:24 UTC (rev 1059) +++ trunk/daimonin/src/daieditor/Updater.java 2006-12-13 19:22:35 UTC (rev 1060) @@ -307,6 +307,7 @@ * @param other Other version information to compare to * @return <code>true</code> if this versionis newer than <var>other</var>, otherwise <code>false</code> */ + @SuppressWarnings({"ObjectEquality"}) boolean isNewerThan(final VersionInfo other) { return this != UNAVAILABLE && (other == UNAVAILABLE || tstamp.compareTo(other.tstamp) > 0); } Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-12-13 19:19:24 UTC (rev 1059) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-12-13 19:22:35 UTC (rev 1060) @@ -308,6 +308,7 @@ * * @return <code>true</code> iff this part if a tail part */ + @SuppressWarnings({"ObjectEquality"}) public boolean isTail() { return getHead() != this; } Modified: trunk/daimonin/src/daieditor/gui/DirectionLayout.java =================================================================== --- trunk/daimonin/src/daieditor/gui/DirectionLayout.java 2006-12-13 19:19:24 UTC (rev 1059) +++ trunk/daimonin/src/daieditor/gui/DirectionLayout.java 2006-12-13 19:22:35 UTC (rev 1060) @@ -299,6 +299,7 @@ } /** {@inheritDoc} */ + @SuppressWarnings({"ObjectEquality"}) public void removeLayoutComponent(final Component comp) { synchronized (comp.getTreeLock()) { if (cC == comp) { Modified: trunk/daimonin/src/daieditor/gui/prefs/GUIPrefs.java =================================================================== --- trunk/daimonin/src/daieditor/gui/prefs/GUIPrefs.java 2006-12-13 19:19:24 UTC (rev 1059) +++ trunk/daimonin/src/daieditor/gui/prefs/GUIPrefs.java 2006-12-13 19:22:35 UTC (rev 1060) @@ -123,7 +123,7 @@ final String currentName = userNodeForPackage(CMainControl.class).get(PREFS_LANGUAGE, null); final Locale current = currentName != null ? new Locale(currentName) : null; return !( - (loc == null ? loc == current : loc.equals(current)) + (loc == null ? current == null : loc.equals(current)) && mapPanelBottom.isSelected() == PREFS.getBoolean(MAP_TILE_LIST_BOTTOM_KEY, MAP_TILE_LIST_BOTTOM_DEFAULT) ); } @@ -134,8 +134,8 @@ */ private Component buildLocaleBox() { final Box lineLayout = createHorizontalBox(); - - final String[] locNames = ACTION_FACTORY.getString("availableLocales").split("\\s+"); + final String availableLocales = ACTION_FACTORY.getString("availableLocales"); + final String[] locNames = availableLocales != null ? availableLocales.split("\\s+") : new String[0]; locales = new Locale[locNames.length + 1]; // locales[0] is intentionally null. It will be displayed as default and always get sorted to the top. for (int i = 0; i < locNames.length; i++) { Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-13 19:19:24 UTC (rev 1059) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-13 19:22:35 UTC (rev 1060) @@ -201,6 +201,8 @@ final GameObject node = mapGrid[pos.x][pos.y].getLast(); int position = 0; for (final GameObject search : mapGrid[pos.x][pos.y].reverse()) { + // This is okay because next is on the desired square. + //noinspection ObjectEquality if (search == next) { break; } Modified: trunk/src/app/net/sf/gridarta/help/HtmlPane.java =================================================================== --- trunk/src/app/net/sf/gridarta/help/HtmlPane.java 2006-12-13 19:19:24 UTC (rev 1059) +++ trunk/src/app/net/sf/gridarta/help/HtmlPane.java 2006-12-13 19:22:35 UTC (rev 1060) @@ -150,7 +150,7 @@ * @param e occurred <code>HyperlinkEvent</code> */ public void hyperlinkUpdate(final HyperlinkEvent e) { - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) { linkActivated(e.getURL()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |