From: <aki...@us...> - 2008-08-15 16:47:29
|
Revision: 4832 http://gridarta.svn.sourceforge.net/gridarta/?rev=4832&view=rev Author: akirschbaum Date: 2008-08-15 16:47:30 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Rename method names. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/script/parameter/ArchComboBoxEditor.java trunk/src/app/net/sf/gridarta/gui/MainActions.java trunk/src/app/net/sf/gridarta/gui/ReplaceDialog.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/map/tools/SelectionTool.java trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java trunk/src/app/net/sf/gridarta/gui/objectchooser/ObjectChooser.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java Modified: trunk/crossfire/src/cfeditor/gui/script/parameter/ArchComboBoxEditor.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/script/parameter/ArchComboBoxEditor.java 2008-08-15 16:40:55 UTC (rev 4831) +++ trunk/crossfire/src/cfeditor/gui/script/parameter/ArchComboBoxEditor.java 2008-08-15 16:47:30 UTC (rev 4832) @@ -104,7 +104,7 @@ fromSelect.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { try { - final Archetype ao = archComboBoxModel.getNearsetMatch(objectChooser.getObjectChooserHighlight().getArchetypeName()); + final Archetype ao = archComboBoxModel.getNearsetMatch(objectChooser.getSelection().getArchetypeName()); archComboBox.setSelectedItem(ao); setItem(ao); } catch (final Exception ex) {//null pointer exception Modified: trunk/src/app/net/sf/gridarta/gui/MainActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/MainActions.java 2008-08-15 16:40:55 UTC (rev 4831) +++ trunk/src/app/net/sf/gridarta/gui/MainActions.java 2008-08-15 16:47:30 UTC (rev 4832) @@ -504,7 +504,7 @@ * @param insertionMode the insertion mode to use */ private void fillWanted(@NotNull final MapView<G, A, R, V> mapView, @NotNull final InsertionMode insertionMode) { - copyBuffer.fill(mapView, insertionMode, objectChooser.getObjectChooserSelection(), -1); + copyBuffer.fill(mapView, insertionMode, objectChooser.getSelections(), -1); } /** "Random fill above" was selected from the Edit menu. */ @@ -532,7 +532,7 @@ final StringBuilder title = new StringBuilder("Random fill "); title.append(insertionMode); title.append(" "); - final G arch = objectChooser.getObjectChooserHighlight(); + final G arch = objectChooser.getSelection(); MapControl<G, A, R, V> pickmap = null; /* if we have a single arch, use it as random seed. @@ -555,7 +555,7 @@ final int rand = getFillDensity(title.toString()); if (rand >= 0) { - copyBuffer.fill(mapView, insertionMode, pickmap == null ? objectChooser.getObjectChooserSelection() : pickmap.getMapViewFrame().getSelectedGameObjects(), rand); + copyBuffer.fill(mapView, insertionMode, pickmap == null ? objectChooser.getSelections() : pickmap.getMapViewFrame().getSelectedGameObjects(), rand); } } @@ -590,7 +590,7 @@ public void floodfill() { final MapView<G, A, R, V> mapView = getFloodfillEnabled(); if (mapView != null) { - copyBuffer.floodfill(mapView, objectChooser.getObjectChooserSelection()); + copyBuffer.floodfill(mapView, objectChooser.getSelections()); } } Modified: trunk/src/app/net/sf/gridarta/gui/ReplaceDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/ReplaceDialog.java 2008-08-15 16:40:55 UTC (rev 4831) +++ trunk/src/app/net/sf/gridarta/gui/ReplaceDialog.java 2008-08-15 16:47:30 UTC (rev 4832) @@ -140,8 +140,8 @@ * @param mapView map view of the active map where the action was invoked */ public void display(final MapView<G, A, R, V> mapView) { - replaceArch = objectChooser.getObjectChooserHighlight(); // highlighted arch - replacePickmap = objectChooser.getObjectChooserSelection(); // selected arches + replaceArch = objectChooser.getSelection(); // highlighted arch + replacePickmap = objectChooser.getSelections(); // selected arches replaceCopyBuffer = copyBuffer.getCopyMapCtrl().getAllGameObjects(); if (!isBuilt) { @@ -406,7 +406,7 @@ switch (selectedIndex) { case 0: // replace with arch - replaceArch = objectChooser.getObjectChooserHighlight(); // selected arch + replaceArch = objectChooser.getSelection(); // selected arch updateArchSelection(replaceArch, true); break; @@ -422,7 +422,7 @@ case 2: // replace with pickmap - replacePickmap = objectChooser.getObjectChooserSelection(); // selected arches + replacePickmap = objectChooser.getSelections(); // selected arches iconLabel.setIcon(null); size = replacePickmap.size(); rfArchName.setText(String.valueOf(size)); Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2008-08-15 16:40:55 UTC (rev 4831) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2008-08-15 16:47:30 UTC (rev 4832) @@ -391,7 +391,7 @@ */ @ActionMethod public void mapArchAddInv() { - final G arch = objectChooser.getObjectChooserHighlight(); + final G arch = objectChooser.getSelection(); if (arch == null) { // nothing selected? return; } Modified: trunk/src/app/net/sf/gridarta/gui/map/tools/SelectionTool.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/tools/SelectionTool.java 2008-08-15 16:40:55 UTC (rev 4831) +++ trunk/src/app/net/sf/gridarta/gui/map/tools/SelectionTool.java 2008-08-15 16:47:30 UTC (rev 4832) @@ -185,7 +185,7 @@ default: throw new AssertionError(); } - copyBuffer.fill(e.getMapView(), insertionMode, objectChooser.getObjectChooserSelection(), -1); + copyBuffer.fill(e.getMapView(), insertionMode, objectChooser.getSelections(), -1); } } Modified: trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java 2008-08-15 16:40:55 UTC (rev 4831) +++ trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java 2008-08-15 16:47:30 UTC (rev 4832) @@ -176,13 +176,13 @@ /** {@inheritDoc} */ @Nullable - public G getObjectChooserHighlight() { + public G getSelection() { return pickmapActive ? pickmapChooserControl.getSelection() : (G) archetypeChooserControl.getSelection(); } /** {@inheritDoc} */ @NotNull - public List<G> getObjectChooserSelection() { + public List<G> getSelections() { return pickmapActive ? pickmapChooserControl.getSelections() : archetypeChooserControl.getSelections(); } Modified: trunk/src/app/net/sf/gridarta/gui/objectchooser/ObjectChooser.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/objectchooser/ObjectChooser.java 2008-08-15 16:40:55 UTC (rev 4831) +++ trunk/src/app/net/sf/gridarta/gui/objectchooser/ObjectChooser.java 2008-08-15 16:47:30 UTC (rev 4832) @@ -57,7 +57,7 @@ * @return the active arch in the left-side panel */ @Nullable - G getObjectChooserHighlight(); + G getSelection(); /** * Returns the selected arches in the left-side panel. This can either be @@ -67,7 +67,7 @@ * @return the selected arches in the left-side panel */ @NotNull - List<G> getObjectChooserSelection(); + List<G> getSelections(); /** * Select an archetype in the archetype chooser. If necessary, activates Modified: trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java 2008-08-15 16:40:55 UTC (rev 4831) +++ trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java 2008-08-15 16:47:30 UTC (rev 4832) @@ -229,7 +229,7 @@ * @param index the list index to insert at */ private void insertGameObjectFromObjectChooser(@NotNull final MapView<G, A, R, V> mapView, final int index) { - final G gameObject = objectChooser.getObjectChooserHighlight(); + final G gameObject = objectChooser.getSelection(); if (gameObject == null) { return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |