Minor semantic changes, nothing earth-shattering here

This commit is contained in:
Brendan Robert 2015-03-12 00:14:36 -05:00
parent cfad4e4bdc
commit 5da472806d
4 changed files with 7 additions and 23 deletions

View File

@ -32,7 +32,7 @@ public class PropertyHelper {
return new JavaBeanStringPropertyBuilder().bean(t).name(fieldName).build();
}
static private Map<Property, Property> boundProperties = new HashMap<>();
private static final Map<Property, Property> boundProperties = new HashMap<>();
static public void bind(Property formProp, Property sourceProp) {
if (boundProperties.containsKey(formProp)) {

View File

@ -10,7 +10,6 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.beans.binding.Bindings;
import javafx.scene.control.ListCell;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.ComboBoxListCell;
import org.badvision.outlaweditor.data.PropertyHelper;
@ -33,21 +32,7 @@ public abstract class EntitySelectorCell<T> extends ComboBoxListCell<T> {
@Override
public void updateSelected(boolean sel) {
// if (sel) {
// Object o = lastSelected.get(nameField);
// if (o != null && !o.equals(getItem())) {
// ((ListCell) o).updateSelected(false);
// }
// textProperty().unbind();
// if (categoryField != null) {
// textProperty().bind(Bindings.concat(categoryField.textProperty(), "/", nameField.textProperty()));
// } else {
// textProperty().bind(Bindings.concat(nameField.textProperty()));
// }
// lastSelected.put(nameField, this);
// } else {
updateItem(getItem(), false);
// }
}
@Override

View File

@ -4,12 +4,10 @@ import java.util.List;
import org.badvision.outlaweditor.ui.EntitySelectorCell;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.beans.binding.Bindings;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.scene.control.ListView;
import javafx.scene.control.cell.ComboBoxListCell;
import javafx.util.StringConverter;
import org.badvision.outlaweditor.Application;
import org.badvision.outlaweditor.Editor;

View File

@ -20,6 +20,7 @@ import static org.badvision.outlaweditor.data.PropertyHelper.stringProp;
import org.badvision.outlaweditor.data.TileUtils;
import org.badvision.outlaweditor.data.xml.Map;
import org.badvision.outlaweditor.data.xml.Script;
import org.badvision.outlaweditor.data.xml.Tile;
import org.badvision.outlaweditor.ui.EntitySelectorCell;
import org.badvision.outlaweditor.ui.MapEditorTabController;
import org.badvision.outlaweditor.ui.ToolType;
@ -278,12 +279,12 @@ public class MapEditorTabControllerImpl extends MapEditorTabController {
@Override
public void rebuildTileSelectors() {
mapSelectTile.getItems().clear();
Application.gameData.getTile().stream().map((t) -> {
Application.gameData.getTile().stream().map((Tile t) -> {
WritableImage img = TileUtils.getImage(t, currentPlatform);
ImageView iv = new ImageView(img);
MenuItem mapSelectItem = new MenuItem(String.valueOf(t.getCategory())+"/"+String.valueOf(t.getName()), iv);
mapSelectItem.setGraphic(new ImageView(TileUtils.getImage(t, currentPlatform)));
mapSelectItem.setOnAction((ActionEvent event) -> {
mapSelectItem.setOnAction((event) -> {
if (getCurrentEditor() != null) {
getCurrentEditor().setCurrentTile(t);
}