use of main.swing.generic.components.editors.TextEditor in project Eidolons by IDemiurge.
the class HT_View method editDefaultProp.
private void editDefaultProp(ObjType type) {
String value = new TextEditor().launch(type.getProperty(getDefaultEditProp()));
if (value != null) {
type.setProperty(getDefaultEditProp(), value);
rebuildAndSetTree();
}
}
use of main.swing.generic.components.editors.TextEditor in project Eidolons by IDemiurge.
the class TreeControlPanel method setProperty.
// private static void setProp(boolean alt, ObjType selectedType) {
//
// }
private static boolean setProperty(boolean alt, ObjType selectedType) {
String name;
String containerString = "Lore;Description;Flavor;Image;Actives;Passives;Attribute Bonuses;Parameter Bonuses;";
// TODO v-flow buttons one-click!
List<String> listData = StringMaster.openContainer(containerString);
name = new ListChooser(SELECTION_MODE.SINGLE, listData, true).choose();
if (name == null) {
return false;
}
// name = new ButtonChoicePanel(SELECTION_MODE.SINGLE,
// listData).choose();
PROPERTY prop = ContentManager.getPROP(name);
String value = null;
if (alt) {
value = new TextEditor().launch(selectedType.getProperty(prop));
} else if (DC_ContentManager.getEditorMap() != null) {
if (DC_ContentManager.getEditorMap().get(name) != null) {
value = DC_ContentManager.getEditorMap().get(name).launch(value, name);
}
} else if (prop == G_PROPS.IMAGE) {
value = new ImageChooser().launch(selectedType.getImagePath(), "");
// tableMouse.getEditor(prop)
} else {
value = new TextEditor().launch(selectedType.getProperty(prop));
}
if (value != null) {
selectedType.setProperty(prop, value);
}
return true;
// TableMouseListener
// if ()
}
Aggregations