From: <aki...@us...> - 2006-09-23 22:45:44
|
Revision: 374 http://svn.sourceforge.net/gridarta/?rev=374&view=rev Author: akirschbaum Date: 2006-09-23 15:45:40 -0700 (Sat, 23 Sep 2006) Log Message: ----------- Rename identifier names. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapTileList.java Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-23 22:27:17 UTC (rev 373) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-09-23 22:45:40 UTC (rev 374) @@ -262,7 +262,7 @@ } } - public int getPanelArch(final int oldindex) { + public int getTileArch(final int oldindex) { final int index; if (oldindex == -1) { index = list.getFirstVisibleIndex(); @@ -305,7 +305,7 @@ if (map == null) { // mouse has been clicked outside the mapview currentSquare = null; - getPanelArch(-1); + getTileArch(-1); list.setEnabled(true); mainView.refreshMapArchPanel(); return; @@ -392,18 +392,13 @@ /* This is the only method defined by ListCellRenderer. We just * reconfigure the Jlabel each time we're called. */ - @Override public Component getListCellRendererComponent( - final JList list, - final Object value, // value to display - final int index, // cell index - final boolean iss, // is the cell selected - final boolean chf) { // the list and the cell have the focus + @Override public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { /* The DefaultListCellRenderer class will take care of * the JLabels text property, it's foreground and background *colors, and so on. */ - super.getListCellRendererComponent(list, value, index, iss, chf); + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (currentSquare == null) { return this; @@ -426,7 +421,7 @@ if (arch != null) { arch = arch.getHead(); - if (!iss && indent == 0) { + if (!isSelected && indent == 0) { this.setBackground(IGUIConstants.BG_COLOR); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-03 23:07:03
|
Revision: 852 http://svn.sourceforge.net/gridarta/?rev=852&view=rev Author: christianhujer Date: 2006-12-03 15:07:03 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Fixed JavaDoc bugs, improved variable naming. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapTileList.java Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-03 22:42:52 UTC (rev 851) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-03 23:07:03 UTC (rev 852) @@ -91,7 +91,11 @@ /** The currently selected MapSquare. */ private transient Point currentSquare = null; - /** Build Panel */ + /** + * Create a CMapTileList. + * @param mainControl MainControl. + * @param mainView MainView. + */ CMapTileList(final CMainControl mainControl, final CMainView mainView) { this.mainControl = mainControl; this.mainView = mainView; @@ -251,7 +255,11 @@ return mainControl.getMapArch(num, currentSquare); } - /** Insert a tile index of list, this will delete it. */ + /** + * Insert a tile index of list, this will delete it. + * @param index Index + * @todo This comment is so stupid, I don't understand it (cher). + */ void deleteIndexFromList(final int index) { if (currentSquare != null && index != -1 && index < list.getModel().getSize()) { final GameObject temp = getMapTileSelection(); @@ -290,19 +298,21 @@ } /** - * Get map start node, then list all arches from bottom up. i used 10 + * Get mapControl start node, then list all arches from bottom up. i used 10 * digits to code the object ids, that should be enough for running the * editor a long time * <p/> * (if arch id != -1, he trys to sit on this arch) ??? + * @param mapControl MapControl to operate on. + * @param archid Id of the Archetype. */ - public void setMapTileList(final MapControl map, final int archid) { + public void setMapTileList(final MapControl mapControl, final int archid) { int sIndex = 0; // index of the tile which is selected by default boolean foundSIndex = false; // true when 'sIndex' has been determined list.setEnabled(false); model.removeAllElements(); - if (map == null) { + if (mapControl == null) { // mouse has been clicked outside the mapview currentSquare = null; getTileArch(-1); @@ -313,12 +323,12 @@ postSelect = -1; listCounter = 0; - currentSquare = map.getMapModel().getMouseRightPos(); + currentSquare = mapControl.getMapModel().getMouseRightPos(); if (currentSquare != null) { // Now go through the list backwards and put all arches // on the panel in this order - for (final GameObject node : map.getMapModel().getMapSquare(currentSquare).reverse()) { + for (final GameObject node : mapControl.getMapModel().getMapSquare(currentSquare).reverse()) { // add the node if (node.getMyID() == archid) { postSelect = listCounter; @@ -335,7 +345,7 @@ foundSIndex = true; // this is it - don't select any other tile } - addInvObjects(node, archid, 1); // browse the inventory of the map object + addInvObjects(node, archid, 1); // browse the inventory of the mapControl object } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-17 12:25:16
|
Revision: 1129 http://svn.sourceforge.net/gridarta/?rev=1129&view=rev Author: akirschbaum Date: 2006-12-17 04:25:17 -0800 (Sun, 17 Dec 2006) Log Message: ----------- Unify comment. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapTileList.java Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-17 12:24:20 UTC (rev 1128) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-17 12:25:17 UTC (rev 1129) @@ -60,8 +60,7 @@ import org.jetbrains.annotations.Nullable; /** - * The panel that holds the map-tiles of the selected map square. (The window - * to the right) + * The panel that displays the arches of the currently selected map square. * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</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: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: <aki...@us...> - 2006-12-17 14:43:06
|
Revision: 1138 http://svn.sourceforge.net/gridarta/?rev=1138&view=rev Author: akirschbaum Date: 2006-12-17 06:43:03 -0800 (Sun, 17 Dec 2006) Log Message: ----------- Remove explicit map redraw. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMapTileList.java Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-17 14:20:04 UTC (rev 1137) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-17 14:43:03 UTC (rev 1138) @@ -193,6 +193,7 @@ // --- right mouse button: insert arch --- if (currentSquare != null && mainControl.getArchPanelHighlight() != null) { + mainControl.getCurrentMap().getMapModel().beginTransaction("Insert"); // TODO; I18N/L10N final int listIndex = getListIndex(e); if (listIndex >= list.getModel().getSize()) { mainControl.insertArchToMap(mainControl.getArchPanelHighlight(), mainControl.getPanelArchName(), null, currentSquare, MapModel.JOIN_ENABLE); @@ -200,10 +201,11 @@ final GameObject entry = (GameObject) model.getElementAt(listIndex); mainControl.insertArchToMap(mainControl.getArchPanelHighlight(), mainControl.getPanelArchName(), entry, currentSquare, MapModel.JOIN_ENABLE); } + mainControl.getCurrentMap().getMapModel().endTransaction(); // refresh mainControl.getCurrentMap().setLevelChangedFlag(); // the map has been modified - mainControl.refreshCurrentMap(); + mainControl.getMainView().refreshMapTileList(); // update tile window } } else { // --- middle mouse button: delete arch --- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |