You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2013/10/05 01:45:53 UTC
svn commit: r1529349 [12/44] - in /pivot/trunk:
charts/src/org/apache/pivot/charts/
charts/src/org/apache/pivot/charts/skin/ core/src/org/apache/pivot/beans/
core/src/org/apache/pivot/collections/
core/src/org/apache/pivot/collections/adapter/ core/src...
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentInspectorSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentInspectorSkin.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentInspectorSkin.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentInspectorSkin.java Fri Oct 4 23:45:40 2013
@@ -65,7 +65,7 @@ abstract class ComponentInspectorSkin ex
public void install(Component component) {
super.install(component);
- ComponentInspector componentInspector = (ComponentInspector)component;
+ ComponentInspector componentInspector = (ComponentInspector) component;
componentInspector.getComponentInspectorListeners().add(this);
componentInspector.add(form);
@@ -102,25 +102,17 @@ abstract class ComponentInspectorSkin ex
/**
* Adds a new control component to the specified form section. The component
* will control the specified property.
- *
- * @param dictionary
- * The property dictionary
- *
- * @param key
- * The property key
- *
- * @param type
- * The type of the property
- *
- * @param section
- * The form section
- *
- * @throws IllegalArgumentException
- * If the form section does not belong to this skin's form
+ *
+ * @param dictionary The property dictionary
+ * @param key The property key
+ * @param type The type of the property
+ * @param section The form section
+ * @throws IllegalArgumentException If the form section does not belong to
+ * this skin's form
*/
@SuppressWarnings("unchecked")
- protected void addControl(Dictionary<String, Object> dictionary, String key,
- Class<?> type, Form.Section section) {
+ protected void addControl(Dictionary<String, Object> dictionary, String key, Class<?> type,
+ Form.Section section) {
if (section.getForm() != form) {
throw new IllegalArgumentException("section does not belong to form.");
}
@@ -138,7 +130,7 @@ abstract class ComponentInspectorSkin ex
} else if (type == String.class) {
control = addStringControl(dictionary, key, section);
} else if (type.isEnum()) {
- control = addEnumControl(dictionary, key, (Class<? extends Enum<?>>)type, section);
+ control = addEnumControl(dictionary, key, (Class<? extends Enum<?>>) type, section);
} else if (type == Point.class) {
control = addPointControl(dictionary, key, section);
} else if (type == Dimensions.class) {
@@ -178,15 +170,10 @@ abstract class ComponentInspectorSkin ex
/**
* Updates the control component associated with the specified property to
* the appropriate state based on the property value.
- *
- * @param dictionary
- * The property dictionary
- *
- * @param key
- * The property key
- *
- * @param type
- * The type of the property
+ *
+ * @param dictionary The property dictionary
+ * @param key The property key
+ * @param type The type of the property
*/
protected void updateControl(Dictionary<String, Object> dictionary, String key, Class<?> type) {
if (type == Boolean.TYPE) {
@@ -220,7 +207,7 @@ abstract class ComponentInspectorSkin ex
private Component addBooleanControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- boolean value = (Boolean)dictionary.get(key);
+ boolean value = (Boolean) dictionary.get(key);
Checkbox checkbox = new Checkbox();
checkbox.setSelected(value);
@@ -250,17 +237,17 @@ abstract class ComponentInspectorSkin ex
}
private void updateBooleanControl(Dictionary<String, Object> dictionary, String key) {
- Checkbox checkbox = (Checkbox)controls.get(key);
+ Checkbox checkbox = (Checkbox) controls.get(key);
if (checkbox != null) {
- boolean value = (Boolean)dictionary.get(key);
+ boolean value = (Boolean) dictionary.get(key);
checkbox.setSelected(value);
}
}
private static Component addIntControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- int value = (Integer)dictionary.get(key);
+ int value = (Integer) dictionary.get(key);
TextInput textInput = new TextInput();
textInput.setTextSize(10);
@@ -274,13 +261,13 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
+ TextInput textInputLocal = (TextInput) component;
try {
dictionary.put(key, Integer.parseInt(textInputLocal.getText()));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- int valueLocal = (Integer)dictionary.get(key);
+ int valueLocal = (Integer) dictionary.get(key);
textInputLocal.setText(String.valueOf(valueLocal));
}
}
@@ -291,17 +278,17 @@ abstract class ComponentInspectorSkin ex
}
private void updateIntControl(Dictionary<String, Object> dictionary, String key) {
- TextInput textInput = (TextInput)controls.get(key);
+ TextInput textInput = (TextInput) controls.get(key);
if (textInput != null) {
- int value = (Integer)dictionary.get(key);
+ int value = (Integer) dictionary.get(key);
textInput.setText(String.valueOf(value));
}
}
private static Component addFloatControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- float value = (Float)dictionary.get(key);
+ float value = (Float) dictionary.get(key);
TextInput textInput = new TextInput();
textInput.setTextSize(10);
@@ -314,13 +301,13 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
+ TextInput textInputLocal = (TextInput) component;
try {
dictionary.put(key, Float.parseFloat(textInputLocal.getText()));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- float valueLocal = (Float)dictionary.get(key);
+ float valueLocal = (Float) dictionary.get(key);
textInputLocal.setText(String.valueOf(valueLocal));
}
}
@@ -331,17 +318,17 @@ abstract class ComponentInspectorSkin ex
}
private void updateFloatControl(Dictionary<String, Object> dictionary, String key) {
- TextInput textInput = (TextInput)controls.get(key);
+ TextInput textInput = (TextInput) controls.get(key);
if (textInput != null) {
- float value = (Float)dictionary.get(key);
+ float value = (Float) dictionary.get(key);
textInput.setText(String.valueOf(value));
}
}
private static Component addDoubleControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- double value = (Double)dictionary.get(key);
+ double value = (Double) dictionary.get(key);
TextInput textInput = new TextInput();
textInput.setTextSize(14);
@@ -354,13 +341,13 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
+ TextInput textInputLocal = (TextInput) component;
try {
dictionary.put(key, Double.parseDouble(textInputLocal.getText()));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- double valueLocal = (Double)dictionary.get(key);
+ double valueLocal = (Double) dictionary.get(key);
textInputLocal.setText(String.valueOf(valueLocal));
}
}
@@ -371,17 +358,17 @@ abstract class ComponentInspectorSkin ex
}
private void updateDoubleControl(Dictionary<String, Object> dictionary, String key) {
- TextInput textInput = (TextInput)controls.get(key);
+ TextInput textInput = (TextInput) controls.get(key);
if (textInput != null) {
- double value = (Double)dictionary.get(key);
+ double value = (Double) dictionary.get(key);
textInput.setText(String.valueOf(value));
}
}
private static Component addStringControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- String value = (String)dictionary.get(key);
+ String value = (String) dictionary.get(key);
TextInput textInput = new TextInput();
textInput.setText(value == null ? "" : value);
@@ -392,13 +379,13 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
+ TextInput textInputLocal = (TextInput) component;
try {
dictionary.put(key, textInputLocal.getText());
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- String valueLocal = (String)dictionary.get(key);
+ String valueLocal = (String) dictionary.get(key);
textInputLocal.setText(valueLocal == null ? "" : valueLocal);
}
}
@@ -409,17 +396,17 @@ abstract class ComponentInspectorSkin ex
}
private void updateStringControl(Dictionary<String, Object> dictionary, String key) {
- TextInput textInput = (TextInput)controls.get(key);
+ TextInput textInput = (TextInput) controls.get(key);
if (textInput != null) {
- String value = (String)dictionary.get(key);
+ String value = (String) dictionary.get(key);
textInput.setText(value == null ? "" : value);
}
}
- private Component addEnumControl(final Dictionary<String, Object> dictionary,
- final String key, Class<? extends Enum<?>> type, Form.Section section) {
- Enum<?> value = (Enum<?>)dictionary.get(key);
+ private Component addEnumControl(final Dictionary<String, Object> dictionary, final String key,
+ Class<? extends Enum<?>> type, Form.Section section) {
+ Enum<?> value = (Enum<?>) dictionary.get(key);
ArrayList<Object> listData = new ArrayList<>();
listData.add(null);
@@ -439,7 +426,8 @@ abstract class ComponentInspectorSkin ex
private boolean updating = false;
@Override
- public void selectedIndexChanged(ListButton listButtonArgument, int previousSelectedIndex) {
+ public void selectedIndexChanged(ListButton listButtonArgument,
+ int previousSelectedIndex) {
if (!updating) {
updating = true;
try {
@@ -458,17 +446,17 @@ abstract class ComponentInspectorSkin ex
}
private void updateEnumControl(Dictionary<String, Object> dictionary, String key) {
- ListButton listButton = (ListButton)controls.get(key);
+ ListButton listButton = (ListButton) controls.get(key);
if (listButton != null) {
- Enum<?> value = (Enum<?>)dictionary.get(key);
+ Enum<?> value = (Enum<?>) dictionary.get(key);
listButton.setSelectedItem(value);
}
}
private static Component addPointControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- Point point = (Point)dictionary.get(key);
+ Point point = (Point) dictionary.get(key);
BoxPane boxPane = new BoxPane(Orientation.VERTICAL);
section.add(boxPane);
@@ -490,8 +478,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Point pointLocal = (Point)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Point pointLocal = (Point) dictionary.get(key);
try {
int x = Integer.parseInt(textInputLocal.getText());
@@ -524,8 +512,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Point pointLocal = (Point)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Point pointLocal = (Point) dictionary.get(key);
try {
int y = Integer.parseInt(textInputLocal.getText());
@@ -546,13 +534,13 @@ abstract class ComponentInspectorSkin ex
}
private void updatePointControl(Dictionary<String, Object> dictionary, String key) {
- BoxPane boxPane = (BoxPane)controls.get(key);
+ BoxPane boxPane = (BoxPane) controls.get(key);
if (boxPane != null) {
- Point point = (Point)dictionary.get(key);
+ Point point = (Point) dictionary.get(key);
- TextInput xTextInput = (TextInput)((FlowPane)boxPane.get(0)).get(0);
- TextInput yTextInput = (TextInput)((FlowPane)boxPane.get(1)).get(0);
+ TextInput xTextInput = (TextInput) ((FlowPane) boxPane.get(0)).get(0);
+ TextInput yTextInput = (TextInput) ((FlowPane) boxPane.get(1)).get(0);
xTextInput.setText(String.valueOf(point.x));
yTextInput.setText(String.valueOf(point.y));
@@ -561,7 +549,7 @@ abstract class ComponentInspectorSkin ex
private static Component addDimensionsControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- Dimensions dimensions = (Dimensions)dictionary.get(key);
+ Dimensions dimensions = (Dimensions) dictionary.get(key);
BoxPane boxPane = new BoxPane(Orientation.VERTICAL);
section.add(boxPane);
@@ -583,8 +571,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Dimensions dimensionsLocal = (Dimensions)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Dimensions dimensionsLocal = (Dimensions) dictionary.get(key);
try {
int width = Integer.parseInt(textInputLocal.getText());
@@ -617,8 +605,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Dimensions dimensionsLocal = (Dimensions)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Dimensions dimensionsLocal = (Dimensions) dictionary.get(key);
try {
int height = Integer.parseInt(textInputLocal.getText());
@@ -639,13 +627,13 @@ abstract class ComponentInspectorSkin ex
}
private void updateDimensionsControl(Dictionary<String, Object> dictionary, String key) {
- BoxPane boxPane = (BoxPane)controls.get(key);
+ BoxPane boxPane = (BoxPane) controls.get(key);
if (boxPane != null) {
- Dimensions dimensions = (Dimensions)dictionary.get(key);
+ Dimensions dimensions = (Dimensions) dictionary.get(key);
- TextInput widthTextInput = (TextInput)((FlowPane)boxPane.get(0)).get(0);
- TextInput heightTextInput = (TextInput)((FlowPane)boxPane.get(1)).get(0);
+ TextInput widthTextInput = (TextInput) ((FlowPane) boxPane.get(0)).get(0);
+ TextInput heightTextInput = (TextInput) ((FlowPane) boxPane.get(1)).get(0);
widthTextInput.setText(String.valueOf(dimensions.width));
heightTextInput.setText(String.valueOf(dimensions.height));
@@ -654,7 +642,7 @@ abstract class ComponentInspectorSkin ex
private static Component addLimitsControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- Limits limits = (Limits)dictionary.get(key);
+ Limits limits = (Limits) dictionary.get(key);
BoxPane boxPane = new BoxPane(Orientation.VERTICAL);
section.add(boxPane);
@@ -676,8 +664,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Limits limitsLocal = (Limits)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Limits limitsLocal = (Limits) dictionary.get(key);
try {
int min = Integer.parseInt(textInputLocal.getText());
@@ -710,8 +698,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Limits limitsLocal = (Limits)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Limits limitsLocal = (Limits) dictionary.get(key);
try {
int max = Integer.parseInt(textInputLocal.getText());
@@ -732,13 +720,13 @@ abstract class ComponentInspectorSkin ex
}
private void updateLimitsControl(Dictionary<String, Object> dictionary, String key) {
- BoxPane boxPane = (BoxPane)controls.get(key);
+ BoxPane boxPane = (BoxPane) controls.get(key);
if (boxPane != null) {
- Limits limits = (Limits)dictionary.get(key);
+ Limits limits = (Limits) dictionary.get(key);
- TextInput minTextInput = (TextInput)((FlowPane)boxPane.get(0)).get(0);
- TextInput maxTextInput = (TextInput)((FlowPane)boxPane.get(1)).get(0);
+ TextInput minTextInput = (TextInput) ((FlowPane) boxPane.get(0)).get(0);
+ TextInput maxTextInput = (TextInput) ((FlowPane) boxPane.get(1)).get(0);
minTextInput.setText(String.valueOf(limits.minimum));
maxTextInput.setText(String.valueOf(limits.maximum));
@@ -747,7 +735,7 @@ abstract class ComponentInspectorSkin ex
private static Component addInsetsControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- Insets insets = (Insets)dictionary.get(key);
+ Insets insets = (Insets) dictionary.get(key);
BoxPane boxPane = new BoxPane(Orientation.VERTICAL);
section.add(boxPane);
@@ -769,8 +757,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Insets insetsLocal = (Insets)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Insets insetsLocal = (Insets) dictionary.get(key);
try {
int top = Integer.parseInt(textInputLocal.getText());
@@ -804,8 +792,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Insets insetsLocal = (Insets)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Insets insetsLocal = (Insets) dictionary.get(key);
try {
int left = Integer.parseInt(textInputLocal.getText());
@@ -839,8 +827,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Insets insetsLocal = (Insets)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Insets insetsLocal = (Insets) dictionary.get(key);
try {
int bottom = Integer.parseInt(textInputLocal.getText());
@@ -874,13 +862,13 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Insets insetsLocal = (Insets)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Insets insetsLocal = (Insets) dictionary.get(key);
try {
int right = Integer.parseInt(textInputLocal.getText());
- dictionary.put(key, new Insets(insetsLocal.top, insetsLocal.left, insetsLocal.bottom,
- right));
+ dictionary.put(key, new Insets(insetsLocal.top, insetsLocal.left,
+ insetsLocal.bottom, right));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
textInputLocal.setText(String.valueOf(insetsLocal.right));
@@ -898,7 +886,7 @@ abstract class ComponentInspectorSkin ex
private static Component addSpanControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- Span span = (Span)dictionary.get(key);
+ Span span = (Span) dictionary.get(key);
BoxPane boxPane = new BoxPane(Orientation.VERTICAL);
section.add(boxPane);
@@ -920,15 +908,17 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Span spanLocal = (Span)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Span spanLocal = (Span) dictionary.get(key);
try {
int start = Integer.parseInt(textInputLocal.getText());
- dictionary.put(key, new Span(start, spanLocal == null ? start : spanLocal.end));
+ dictionary.put(key, new Span(start, spanLocal == null ? start
+ : spanLocal.end));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- textInputLocal.setText(spanLocal == null ? "" : String.valueOf(spanLocal.start));
+ textInputLocal.setText(spanLocal == null ? ""
+ : String.valueOf(spanLocal.start));
}
}
}
@@ -954,15 +944,17 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Span spanLocal = (Span)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Span spanLocal = (Span) dictionary.get(key);
try {
int end = Integer.parseInt(textInputLocal.getText());
- dictionary.put(key, new Span(spanLocal == null ? end : spanLocal.start, end));
+ dictionary.put(key,
+ new Span(spanLocal == null ? end : spanLocal.start, end));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- textInputLocal.setText(spanLocal == null ? "" : String.valueOf(spanLocal.end));
+ textInputLocal.setText(spanLocal == null ? ""
+ : String.valueOf(spanLocal.end));
}
}
}
@@ -976,13 +968,13 @@ abstract class ComponentInspectorSkin ex
}
private void updateSpanControl(Dictionary<String, Object> dictionary, String key) {
- BoxPane boxPane = (BoxPane)controls.get(key);
+ BoxPane boxPane = (BoxPane) controls.get(key);
if (boxPane != null) {
- Span span = (Span)dictionary.get(key);
+ Span span = (Span) dictionary.get(key);
- TextInput startTextInput = (TextInput)((FlowPane)boxPane.get(0)).get(0);
- TextInput endTextInput = (TextInput)((FlowPane)boxPane.get(1)).get(0);
+ TextInput startTextInput = (TextInput) ((FlowPane) boxPane.get(0)).get(0);
+ TextInput endTextInput = (TextInput) ((FlowPane) boxPane.get(1)).get(0);
startTextInput.setText(span == null ? "" : String.valueOf(span.start));
endTextInput.setText(span == null ? "" : String.valueOf(span.end));
@@ -991,7 +983,7 @@ abstract class ComponentInspectorSkin ex
private static Component addCornerRadiiControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- CornerRadii cornerRadii = (CornerRadii)dictionary.get(key);
+ CornerRadii cornerRadii = (CornerRadii) dictionary.get(key);
BoxPane boxPane = new BoxPane(Orientation.VERTICAL);
section.add(boxPane);
@@ -1013,8 +1005,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- CornerRadii cornerRadiiLocal = (CornerRadii)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ CornerRadii cornerRadiiLocal = (CornerRadii) dictionary.get(key);
try {
int topLeft = Integer.parseInt(textInputLocal.getText());
@@ -1048,8 +1040,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- CornerRadii cornerRadiiLocal = (CornerRadii)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ CornerRadii cornerRadiiLocal = (CornerRadii) dictionary.get(key);
try {
int topRight = Integer.parseInt(textInputLocal.getText());
@@ -1083,8 +1075,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- CornerRadii cornerRadiiLocal = (CornerRadii)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ CornerRadii cornerRadiiLocal = (CornerRadii) dictionary.get(key);
try {
int bottomLeft = Integer.parseInt(textInputLocal.getText());
@@ -1118,8 +1110,8 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- CornerRadii cornerRadiiLocal = (CornerRadii)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ CornerRadii cornerRadiiLocal = (CornerRadii) dictionary.get(key);
try {
int bottomRight = Integer.parseInt(textInputLocal.getText());
@@ -1142,7 +1134,7 @@ abstract class ComponentInspectorSkin ex
private static Component addScopeControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- Scope scope = (Scope)dictionary.get(key);
+ Scope scope = (Scope) dictionary.get(key);
BoxPane boxPane = new BoxPane(Orientation.VERTICAL);
section.add(boxPane);
@@ -1164,16 +1156,17 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Scope scopeLocal = (Scope)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Scope scopeLocal = (Scope) dictionary.get(key);
try {
int start = Integer.parseInt(textInputLocal.getText());
- dictionary.put(key, new Scope(start, scopeLocal == null ? start : scopeLocal.end,
- scopeLocal == null ? start : scopeLocal.extent));
+ dictionary.put(key, new Scope(start, scopeLocal == null ? start
+ : scopeLocal.end, scopeLocal == null ? start : scopeLocal.extent));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- textInputLocal.setText(scopeLocal == null ? "" : String.valueOf(scopeLocal.start));
+ textInputLocal.setText(scopeLocal == null ? ""
+ : String.valueOf(scopeLocal.start));
}
}
}
@@ -1199,16 +1192,17 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Scope scopeLocal = (Scope)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Scope scopeLocal = (Scope) dictionary.get(key);
try {
int end = Integer.parseInt(textInputLocal.getText());
- dictionary.put(key, new Scope(scopeLocal == null ? end : scopeLocal.start, end,
- scopeLocal == null ? end : scopeLocal.extent));
+ dictionary.put(key, new Scope(scopeLocal == null ? end : scopeLocal.start,
+ end, scopeLocal == null ? end : scopeLocal.extent));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- textInputLocal.setText(scopeLocal == null ? "" : String.valueOf(scopeLocal.end));
+ textInputLocal.setText(scopeLocal == null ? ""
+ : String.valueOf(scopeLocal.end));
}
}
}
@@ -1234,16 +1228,18 @@ abstract class ComponentInspectorSkin ex
@Override
public void focusedChanged(Component component, Component obverseComponent) {
if (!component.isFocused()) {
- TextInput textInputLocal = (TextInput)component;
- Scope scopeLocal = (Scope)dictionary.get(key);
+ TextInput textInputLocal = (TextInput) component;
+ Scope scopeLocal = (Scope) dictionary.get(key);
try {
int extent = Integer.parseInt(textInputLocal.getText());
- dictionary.put(key, new Scope(scopeLocal == null ? extent : scopeLocal.start,
- scopeLocal == null ? extent : scopeLocal.end, extent));
+ dictionary.put(key, new Scope(scopeLocal == null ? extent
+ : scopeLocal.start, scopeLocal == null ? extent : scopeLocal.end,
+ extent));
} catch (Exception exception) {
displayErrorMessage(exception, component.getWindow());
- textInputLocal.setText(scopeLocal == null ? "" : String.valueOf(scopeLocal.extent));
+ textInputLocal.setText(scopeLocal == null ? ""
+ : String.valueOf(scopeLocal.extent));
}
}
}
@@ -1257,14 +1253,14 @@ abstract class ComponentInspectorSkin ex
}
private void updateScopeControl(Dictionary<String, Object> dictionary, String key) {
- BoxPane boxPane = (BoxPane)controls.get(key);
+ BoxPane boxPane = (BoxPane) controls.get(key);
if (boxPane != null) {
- Scope scope = (Scope)dictionary.get(key);
+ Scope scope = (Scope) dictionary.get(key);
- TextInput startTextInput = (TextInput)((FlowPane)boxPane.get(0)).get(0);
- TextInput endTextInput = (TextInput)((FlowPane)boxPane.get(1)).get(0);
- TextInput extentTextInput = (TextInput)((FlowPane)boxPane.get(2)).get(0);
+ TextInput startTextInput = (TextInput) ((FlowPane) boxPane.get(0)).get(0);
+ TextInput endTextInput = (TextInput) ((FlowPane) boxPane.get(1)).get(0);
+ TextInput extentTextInput = (TextInput) ((FlowPane) boxPane.get(2)).get(0);
startTextInput.setText(scope == null ? "" : String.valueOf(scope.start));
endTextInput.setText(scope == null ? "" : String.valueOf(scope.end));
@@ -1274,42 +1270,42 @@ abstract class ComponentInspectorSkin ex
private static Component addColorControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- Color color = (Color)dictionary.get(key);
+ Color color = (Color) dictionary.get(key);
ColorChooserButton colorChooserButton = new ColorChooserButton();
colorChooserButton.setSelectedColor(color);
section.add(colorChooserButton);
Form.setLabel(colorChooserButton, key);
- colorChooserButton.getColorChooserButtonSelectionListeners().add
- (new ColorChooserButtonSelectionListener() {
- @Override
- public void selectedColorChanged(ColorChooserButton colorChooserButtonArgument,
- Color previousSelectedColor) {
- try {
- dictionary.put(key, colorChooserButtonArgument.getSelectedColor());
- } catch (Exception exception) {
- displayErrorMessage(exception, colorChooserButtonArgument.getWindow());
- dictionary.put(key, previousSelectedColor);
+ colorChooserButton.getColorChooserButtonSelectionListeners().add(
+ new ColorChooserButtonSelectionListener() {
+ @Override
+ public void selectedColorChanged(ColorChooserButton colorChooserButtonArgument,
+ Color previousSelectedColor) {
+ try {
+ dictionary.put(key, colorChooserButtonArgument.getSelectedColor());
+ } catch (Exception exception) {
+ displayErrorMessage(exception, colorChooserButtonArgument.getWindow());
+ dictionary.put(key, previousSelectedColor);
+ }
}
- }
- });
+ });
return colorChooserButton;
}
private void updateColorControl(Dictionary<String, Object> dictionary, String key) {
- ColorChooserButton colorChooserButton = (ColorChooserButton)controls.get(key);
+ ColorChooserButton colorChooserButton = (ColorChooserButton) controls.get(key);
if (colorChooserButton != null) {
- Color value = (Color)dictionary.get(key);
+ Color value = (Color) dictionary.get(key);
colorChooserButton.setSelectedColor(value);
}
}
private static Component addCalendarDateControl(final Dictionary<String, Object> dictionary,
final String key, Form.Section section) {
- CalendarDate calendarDate = (CalendarDate)dictionary.get(key);
+ CalendarDate calendarDate = (CalendarDate) dictionary.get(key);
CalendarButton calendarButton = new CalendarButton();
calendarButton.setMinimumWidth(75);
@@ -1317,28 +1313,28 @@ abstract class ComponentInspectorSkin ex
section.add(calendarButton);
Form.setLabel(calendarButton, key);
- calendarButton.getCalendarButtonSelectionListeners().add
- (new CalendarButtonSelectionListener() {
- @Override
- public void selectedDateChanged(CalendarButton calendarButtonArgument,
- CalendarDate previousSelectedDate) {
- try {
- dictionary.put(key, calendarButtonArgument.getSelectedDate());
- } catch (Exception exception) {
- displayErrorMessage(exception, calendarButtonArgument.getWindow());
- dictionary.put(key, previousSelectedDate);
+ calendarButton.getCalendarButtonSelectionListeners().add(
+ new CalendarButtonSelectionListener() {
+ @Override
+ public void selectedDateChanged(CalendarButton calendarButtonArgument,
+ CalendarDate previousSelectedDate) {
+ try {
+ dictionary.put(key, calendarButtonArgument.getSelectedDate());
+ } catch (Exception exception) {
+ displayErrorMessage(exception, calendarButtonArgument.getWindow());
+ dictionary.put(key, previousSelectedDate);
+ }
}
- }
- });
+ });
return calendarButton;
}
private void updateCalendarDateControl(Dictionary<String, Object> dictionary, String key) {
- CalendarButton calendarButton = (CalendarButton)controls.get(key);
+ CalendarButton calendarButton = (CalendarButton) controls.get(key);
if (calendarButton != null) {
- CalendarDate value = (CalendarDate)dictionary.get(key);
+ CalendarDate value = (CalendarDate) dictionary.get(key);
calendarButton.setSelectedDate(value);
}
}
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentPropertyInspectorSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentPropertyInspectorSkin.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentPropertyInspectorSkin.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ComponentPropertyInspectorSkin.java Fri Oct 4 23:45:40 2013
@@ -91,14 +91,13 @@ class ComponentPropertyInspectorSkin ext
beanMonitor.getPropertyChangeListeners().add(propertyChangeListener);
Class<?> sourceType = source.getClass();
- HashMap<Class<?>, List<String>> declaringClassPartitions =
- new HashMap<>(classComparator);
+ HashMap<Class<?>, List<String>> declaringClassPartitions = new HashMap<>(
+ classComparator);
// Partition the properties by their declaring class
BeanAdapter beanAdapter = new BeanAdapter(source);
for (String propertyName : beanAdapter) {
- if (beanMonitor.isNotifying(propertyName)
- && !beanAdapter.isReadOnly(propertyName)) {
+ if (beanMonitor.isNotifying(propertyName) && !beanAdapter.isReadOnly(propertyName)) {
Method method = BeanAdapter.getGetterMethod(sourceType, propertyName);
Class<?> declaringClass = method.getDeclaringClass();
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLogger.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLogger.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLogger.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLogger.java Fri Oct 4 23:45:40 2013
@@ -49,17 +49,17 @@ public class EventLogger extends Contain
/**
* Select/Deselect all Events to log.
- * @param select
- * if true, all events will be selected for the log,
+ *
+ * @param select if true, all events will be selected for the log,
* otherwise all events will be deselected
*/
public void selectAllEvents(boolean select);
}
/**
- * A read-only group of events that an event logger is capable of firing.
- * To make an event logger actually fire declared events, callers add them
- * to the event logger's include event group.
+ * A read-only group of events that an event logger is capable of firing. To
+ * make an event logger actually fire declared events, callers add them to
+ * the event logger's include event group.
*/
public final class DeclaredEventGroup implements Group<Method>, Iterable<Method> {
private DeclaredEventGroup() {
@@ -221,9 +221,8 @@ public class EventLogger extends Contain
/**
* Gets this event logger's source component.
- *
- * @return
- * The source component, or <tt>null</tt> if no source has been set.
+ *
+ * @return The source component, or <tt>null</tt> if no source has been set.
*/
public Component getSource() {
return source;
@@ -231,9 +230,8 @@ public class EventLogger extends Contain
/**
* Sets this event logger's source component.
- *
- * @param source
- * The source component, or <tt>null</tt> to clear the source.
+ *
+ * @param source The source component, or <tt>null</tt> to clear the source.
*/
public void setSource(Component source) {
Component previousSource = this.source;
@@ -259,9 +257,8 @@ public class EventLogger extends Contain
/**
* Gets the declared event group, a read-only group that includes the
* complete list of events that this event logger's source declares.
- *
- * @return
- * the declared events group.
+ *
+ * @return the declared events group.
*/
public DeclaredEventGroup getDeclaredEvents() {
return declaredEventGroup;
@@ -269,13 +266,12 @@ public class EventLogger extends Contain
/**
* Gets the include events group, which callers can use to include or
- * exclude declared events from those that get fired by this logger.
- * This group is guaranteed to be a subset of the declared event group
- * (attempts to add events to this group that are not included in the
- * declared event group will fail).
- *
- * @return
- * The include events group.
+ * exclude declared events from those that get fired by this logger. This
+ * group is guaranteed to be a subset of the declared event group (attempts
+ * to add events to this group that are not included in the declared event
+ * group will fail).
+ *
+ * @return The include events group.
*/
public IncludeEventGroup getIncludeEvents() {
return includeEventGroup;
@@ -285,18 +281,19 @@ public class EventLogger extends Contain
* Clears the event log.
*/
public void clearLog() {
- EventLogger.Skin eventLoggerSkin = (EventLogger.Skin)getSkin();
+ EventLogger.Skin eventLoggerSkin = (EventLogger.Skin) getSkin();
eventLoggerSkin.clearLog();
}
/**
* Select/Deselect all Events to log.
- * @param select
- * if true, all events will be selected for the log,
- * otherwise all events will be deselected
+ *
+ * @param select if true, all events will be selected for the log, otherwise
+ * all events will be deselected
*/
public void selectAllEvents(boolean select) {
- // Include or exclude each possible method from the group of monitored events
+ // Include or exclude each possible method from the group of monitored
+ // events
IncludeEventGroup includeEventsLocal = getIncludeEvents();
for (Method event : declaredEvents) {
if (select) {
@@ -306,7 +303,7 @@ public class EventLogger extends Contain
}
}
// Update the skin (Checkboxes)
- EventLogger.Skin eventLoggerSkin = (EventLogger.Skin)getSkin();
+ EventLogger.Skin eventLoggerSkin = (EventLogger.Skin) getSkin();
eventLoggerSkin.selectAllEvents(select);
}
@@ -321,11 +318,11 @@ public class EventLogger extends Contain
if (ListenerList.class.isAssignableFrom(method.getReturnType())
&& (method.getModifiers() & Modifier.STATIC) == 0) {
- ParameterizedType genericType = (ParameterizedType)method.getGenericReturnType();
+ ParameterizedType genericType = (ParameterizedType) method.getGenericReturnType();
Type[] typeArguments = genericType.getActualTypeArguments();
if (typeArguments.length == 1) {
- Class<?> listenerInterface = (Class<?>)typeArguments[0];
+ Class<?> listenerInterface = (Class<?>) typeArguments[0];
if (!listenerInterface.isInterface()) {
throw new RuntimeException(listenerInterface.getName()
@@ -351,8 +348,9 @@ public class EventLogger extends Contain
// Get the listener for this interface
Object listener = eventListenerProxies.get(listenerInterface);
if (listener == null) {
- listener = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
- new Class<?>[]{listenerInterface}, loggerInvocationHandler);
+ listener = Proxy.newProxyInstance(
+ Thread.currentThread().getContextClassLoader(),
+ new Class<?>[] { listenerInterface }, loggerInvocationHandler);
eventListenerProxies.put(listenerInterface, listener);
}
@@ -388,11 +386,11 @@ public class EventLogger extends Contain
if (ListenerList.class.isAssignableFrom(method.getReturnType())
&& (method.getModifiers() & Modifier.STATIC) == 0) {
- ParameterizedType genericType = (ParameterizedType)method.getGenericReturnType();
+ ParameterizedType genericType = (ParameterizedType) method.getGenericReturnType();
Type[] typeArguments = genericType.getActualTypeArguments();
if (typeArguments.length == 1) {
- Class<?> listenerInterface = (Class<?>)typeArguments[0];
+ Class<?> listenerInterface = (Class<?>) typeArguments[0];
// Get the listener list
Object listenerList;
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerListener.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerListener.java Fri Oct 4 23:45:40 2013
@@ -51,7 +51,7 @@ public interface EventLoggerListener {
/**
* Called when an event logger's source has changed.
- *
+ *
* @param eventLogger
* @param previousSource
*/
@@ -60,7 +60,7 @@ public interface EventLoggerListener {
/**
* Called when a declared event has been included in the list of logged
* events.
- *
+ *
* @param eventLogger
* @param event
*/
@@ -69,7 +69,7 @@ public interface EventLoggerListener {
/**
* Called when a declared event has been excluded from the list of logged
* events.
- *
+ *
* @param eventLogger
* @param event
*/
@@ -78,7 +78,7 @@ public interface EventLoggerListener {
/**
* Called when an included event has been fired by the event logger's
* source.
- *
+ *
* @param eventLogger
* @param event
* @param arguments
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerSkin.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerSkin.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/EventLoggerSkin.java Fri Oct 4 23:45:40 2013
@@ -78,13 +78,13 @@ class EventLoggerSkin extends ContainerS
public void install(Component component) {
super.install(component);
- EventLogger eventLogger = (EventLogger)component;
+ EventLogger eventLogger = (EventLogger) component;
eventLogger.getEventLoggerListeners().add(this);
BXMLSerializer bxmlSerializer = new BXMLSerializer();
try {
- content = (Component)bxmlSerializer.readObject(EventLoggerSkin.class,
+ content = (Component) bxmlSerializer.readObject(EventLoggerSkin.class,
"event_logger_skin.bxml", true);
} catch (IOException exception) {
throw new RuntimeException(exception);
@@ -94,8 +94,9 @@ class EventLoggerSkin extends ContainerS
eventLogger.add(content);
- declaredEventsTreeView = (TreeView)bxmlSerializer.getNamespace().get("declaredEventsTreeView");
- firedEventsTableView = (TableView)bxmlSerializer.getNamespace().get("firedEventsTableView");
+ declaredEventsTreeView = (TreeView) bxmlSerializer.getNamespace().get(
+ "declaredEventsTreeView");
+ firedEventsTableView = (TableView) bxmlSerializer.getNamespace().get("firedEventsTableView");
// Propagate check state upwards or downwards as necessary
declaredEventsTreeView.getTreeViewNodeStateListeners().add(new TreeViewNodeStateListener() {
@@ -114,18 +115,18 @@ class EventLoggerSkin extends ContainerS
}
});
- EventLogger eventLoggerLocal = (EventLogger)getComponent();
+ EventLogger eventLoggerLocal = (EventLogger) getComponent();
boolean checked = (checkState == TreeView.NodeCheckState.CHECKED);
List<?> treeData = treeView.getTreeData();
- TreeNode treeNode = (TreeNode)Sequence.Tree.get(treeData, path);
+ TreeNode treeNode = (TreeNode) Sequence.Tree.get(treeData, path);
if (treeNode instanceof List<?>) {
if (previousCheckState == TreeView.NodeCheckState.CHECKED
|| checkState == TreeView.NodeCheckState.CHECKED) {
// Propagate downward
- List<?> treeBranch = (List<?>)treeNode;
+ List<?> treeBranch = (List<?>) treeNode;
Path childPath = new Path(path);
int lastIndex = childPath.getLength();
@@ -135,7 +136,7 @@ class EventLoggerSkin extends ContainerS
childPath.update(lastIndex, i);
treeView.setNodeChecked(childPath, checked);
- EventNode eventNode = (EventNode)treeBranch.get(i);
+ EventNode eventNode = (EventNode) treeBranch.get(i);
Method event = eventNode.getEvent();
if (checked) {
@@ -148,11 +149,11 @@ class EventLoggerSkin extends ContainerS
} else {
Path parentPath = new Path(path, path.getLength() - 1);
- EventNode eventNode = (EventNode)treeNode;
+ EventNode eventNode = (EventNode) treeNode;
Method event = eventNode.getEvent();
if (checked) {
- List<?> treeBranch = (List<?>)Sequence.Tree.get(treeData, parentPath);
+ List<?> treeBranch = (List<?>) Sequence.Tree.get(treeData, parentPath);
Path childPath = new Path(path);
int lastIndex = parentPath.getLength();
@@ -219,10 +220,10 @@ class EventLoggerSkin extends ContainerS
@Override
public void selectAllEvents(boolean select) {
@SuppressWarnings("unchecked")
- List<TreeNode> treeData = (List<TreeNode>)declaredEventsTreeView.getTreeData();
+ List<TreeNode> treeData = (List<TreeNode>) declaredEventsTreeView.getTreeData();
ItemIterator<TreeNode> iter = Sequence.Tree.depthFirstIterator(treeData);
- while(iter.hasNext()) {
+ while (iter.hasNext()) {
iter.next();
declaredEventsTreeView.setNodeChecked(iter.getPath(), select);
}
@@ -232,7 +233,7 @@ class EventLoggerSkin extends ContainerS
@Override
public void sourceChanged(EventLogger eventLogger, Component previousSource) {
- //Component source = eventLogger.getSource();
+ // Component source = eventLogger.getSource();
HashMap<Class<?>, ArrayList<Method>> buckets = new HashMap<>();
@@ -286,14 +287,14 @@ class EventLoggerSkin extends ContainerS
private void setEventIncluded(Method event, boolean included) {
@SuppressWarnings("unchecked")
- List<TreeNode> treeData = (List<TreeNode>)declaredEventsTreeView.getTreeData();
+ List<TreeNode> treeData = (List<TreeNode>) declaredEventsTreeView.getTreeData();
Sequence.Tree.ItemIterator<TreeNode> iter = Sequence.Tree.depthFirstIterator(treeData);
while (iter.hasNext()) {
TreeNode treeNode = iter.next();
if (treeNode instanceof EventNode) {
- EventNode eventNode = (EventNode)treeNode;
+ EventNode eventNode = (EventNode) treeNode;
if (eventNode.getEvent() == event) {
declaredEventsTreeView.setNodeChecked(iter.getPath(), included);
@@ -311,7 +312,7 @@ class EventLoggerSkin extends ContainerS
row.put("arguments", Arrays.toString(arguments));
@SuppressWarnings("unchecked")
- List<Object> tableData = (List<Object>)firedEventsTableView.getTableData();
+ List<Object> tableData = (List<Object>) firedEventsTableView.getTableData();
final int rowIndex = tableData.add(row);
ApplicationContext.queueCallback(new Runnable() {
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowsing.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowsing.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowsing.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowsing.java Fri Oct 4 23:45:40 2013
@@ -38,8 +38,10 @@ import org.apache.pivot.wtk.SheetCloseLi
import org.apache.pivot.wtk.Window;
public class FileBrowsing extends Window implements Bindable {
- @BXML private ButtonGroup fileBrowserSheetModeGroup = null;
- @BXML private PushButton openSheetButton = null;
+ @BXML
+ private ButtonGroup fileBrowserSheetModeGroup = null;
+ @BXML
+ private PushButton openSheetButton = null;
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
@@ -48,12 +50,13 @@ public class FileBrowsing extends Window
public void buttonPressed(Button button) {
Button selection = fileBrowserSheetModeGroup.getSelection();
- String mode = (String)selection.getUserData().get("mode");
+ String mode = (String) selection.getUserData().get("mode");
FileBrowserSheet.Mode fileBrowserSheetMode = FileBrowserSheet.Mode.valueOf(mode.toUpperCase());
final FileBrowserSheet fileBrowserSheet = new FileBrowserSheet();
if (fileBrowserSheetMode == FileBrowserSheet.Mode.SAVE_AS) {
- fileBrowserSheet.setSelectedFile(new File(fileBrowserSheet.getRootDirectory(), "New File"));
+ fileBrowserSheet.setSelectedFile(new File(fileBrowserSheet.getRootDirectory(),
+ "New File"));
}
fileBrowserSheet.setMode(fileBrowserSheetMode);
@@ -68,9 +71,11 @@ public class FileBrowsing extends Window
listView.setSelectMode(ListView.SelectMode.NONE);
listView.getStyles().put("backgroundColor", null);
- Alert.alert(MessageType.INFO, "You selected:", listView, FileBrowsing.this);
+ Alert.alert(MessageType.INFO, "You selected:", listView,
+ FileBrowsing.this);
} else {
- Alert.alert(MessageType.INFO, "You didn't select anything.", FileBrowsing.this);
+ Alert.alert(MessageType.INFO, "You didn't select anything.",
+ FileBrowsing.this);
}
}
});
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/BoxPanes.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/BoxPanes.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/BoxPanes.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/BoxPanes.java Fri Oct 4 23:45:40 2013
@@ -21,10 +21,10 @@ import java.net.URL;
import org.apache.pivot.beans.Bindable;
import org.apache.pivot.collections.Map;
import org.apache.pivot.util.Resources;
+import org.apache.pivot.wtk.BoxPane;
import org.apache.pivot.wtk.Button;
import org.apache.pivot.wtk.ButtonStateListener;
import org.apache.pivot.wtk.Checkbox;
-import org.apache.pivot.wtk.BoxPane;
import org.apache.pivot.wtk.HorizontalAlignment;
import org.apache.pivot.wtk.Orientation;
import org.apache.pivot.wtk.RadioButton;
@@ -45,16 +45,16 @@ public class BoxPanes extends Window imp
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- boxPane = (BoxPane)namespace.get("boxPane");
- horizontalOrientationButton = (RadioButton)namespace.get("horizontalOrientationButton");
- verticalOrientationButton = (RadioButton)namespace.get("verticalOrientationButton");
- horizontalAlignmentRightButton = (RadioButton)namespace.get("horizontalAlignmentRightButton");
- horizontalAlignmentLeftButton = (RadioButton)namespace.get("horizontalAlignmentLeftButton");
- horizontalAlignmentCenterButton = (RadioButton)namespace.get("horizontalAlignmentCenterButton");
- verticalAlignmentTopButton = (RadioButton)namespace.get("verticalAlignmentTopButton");
- verticalAlignmentBottomButton = (RadioButton)namespace.get("verticalAlignmentBottomButton");
- verticalAlignmentCenterButton = (RadioButton)namespace.get("verticalAlignmentCenterButton");
- fillCheckbox = (Checkbox)namespace.get("fillCheckbox");
+ boxPane = (BoxPane) namespace.get("boxPane");
+ horizontalOrientationButton = (RadioButton) namespace.get("horizontalOrientationButton");
+ verticalOrientationButton = (RadioButton) namespace.get("verticalOrientationButton");
+ horizontalAlignmentRightButton = (RadioButton) namespace.get("horizontalAlignmentRightButton");
+ horizontalAlignmentLeftButton = (RadioButton) namespace.get("horizontalAlignmentLeftButton");
+ horizontalAlignmentCenterButton = (RadioButton) namespace.get("horizontalAlignmentCenterButton");
+ verticalAlignmentTopButton = (RadioButton) namespace.get("verticalAlignmentTopButton");
+ verticalAlignmentBottomButton = (RadioButton) namespace.get("verticalAlignmentBottomButton");
+ verticalAlignmentCenterButton = (RadioButton) namespace.get("verticalAlignmentCenterButton");
+ fillCheckbox = (Checkbox) namespace.get("fillCheckbox");
ButtonStateListener buttonStateListener = new ButtonStateListener() {
@Override
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/FillPanes.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/FillPanes.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/FillPanes.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/FillPanes.java Fri Oct 4 23:45:40 2013
@@ -35,9 +35,9 @@ public class FillPanes extends Window im
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- fillPane = (FillPane)namespace.get("fillPane");
- horizontalOrientationButton = (RadioButton)namespace.get("horizontalOrientationButton");
- verticalOrientationButton = (RadioButton)namespace.get("verticalOrientationButton");
+ fillPane = (FillPane) namespace.get("fillPane");
+ horizontalOrientationButton = (RadioButton) namespace.get("horizontalOrientationButton");
+ verticalOrientationButton = (RadioButton) namespace.get("verticalOrientationButton");
ButtonStateListener buttonStateListener = new ButtonStateListener() {
@Override
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/FlowPanes.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/FlowPanes.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/FlowPanes.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/FlowPanes.java Fri Oct 4 23:45:40 2013
@@ -38,11 +38,11 @@ public class FlowPanes extends Window im
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- flowPane = (FlowPane)namespace.get("flowPane");
- leftRadioButton = (RadioButton)namespace.get("leftRadioButton");
- rightRadioButton = (RadioButton)namespace.get("rightRadioButton");
- centerRadioButton = (RadioButton)namespace.get("centerRadioButton");
- alignToBaselineCheckbox = (Checkbox)namespace.get("alignToBaselineCheckbox");
+ flowPane = (FlowPane) namespace.get("flowPane");
+ leftRadioButton = (RadioButton) namespace.get("leftRadioButton");
+ rightRadioButton = (RadioButton) namespace.get("rightRadioButton");
+ centerRadioButton = (RadioButton) namespace.get("centerRadioButton");
+ alignToBaselineCheckbox = (Checkbox) namespace.get("alignToBaselineCheckbox");
ButtonStateListener buttonStateListener = new ButtonStateListener() {
@Override
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/Forms.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/Forms.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/Forms.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/Forms.java Fri Oct 4 23:45:40 2013
@@ -21,9 +21,9 @@ import java.net.URL;
import org.apache.pivot.beans.Bindable;
import org.apache.pivot.collections.Map;
import org.apache.pivot.util.Resources;
+import org.apache.pivot.wtk.BoxPane;
import org.apache.pivot.wtk.Button;
import org.apache.pivot.wtk.ButtonPressListener;
-import org.apache.pivot.wtk.BoxPane;
import org.apache.pivot.wtk.Form;
import org.apache.pivot.wtk.Label;
import org.apache.pivot.wtk.MessageType;
@@ -41,11 +41,11 @@ public class Forms extends Window implem
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- nameBoxPane = (BoxPane)namespace.get("nameBoxPane");
- lastNameTextInput = (TextInput)namespace.get("lastNameTextInput");
- firstNameTextInput = (TextInput)namespace.get("firstNameTextInput");
- submitButton = (PushButton)namespace.get("submitButton");
- errorLabel = (Label)namespace.get("errorLabel");
+ nameBoxPane = (BoxPane) namespace.get("nameBoxPane");
+ lastNameTextInput = (TextInput) namespace.get("lastNameTextInput");
+ firstNameTextInput = (TextInput) namespace.get("firstNameTextInput");
+ submitButton = (PushButton) namespace.get("submitButton");
+ errorLabel = (Label) namespace.get("errorLabel");
submitButton.getButtonPressListeners().add(new ButtonPressListener() {
@Override
@@ -54,8 +54,7 @@ public class Forms extends Window implem
String firstName = firstNameTextInput.getText();
Form.Flag flag = null;
- if (lastName.length() == 0
- || firstName.length() == 0) {
+ if (lastName.length() == 0 || firstName.length() == 0) {
flag = new Form.Flag(MessageType.ERROR, "Name is required.");
}
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/SimpleTablePanes.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/SimpleTablePanes.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/SimpleTablePanes.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/SimpleTablePanes.java Fri Oct 4 23:45:40 2013
@@ -37,40 +37,41 @@ public class SimpleTablePanes extends Wi
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- tablePane = (TablePane)namespace.get("tablePane");
+ tablePane = (TablePane) namespace.get("tablePane");
- tablePane.getComponentMouseButtonListeners().add(new ComponentMouseButtonListener.Adapter() {
- @Override
- public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
- int rowIndex = tablePane.getRowAt(y);
- int columnIndex = tablePane.getColumnAt(x);
-
- if (rowIndex >= 0
- && columnIndex >= 0) {
- TablePane.Row row = tablePane.getRows().get(rowIndex);
- TablePane.Column column = tablePane.getColumns().get(columnIndex);
-
- int rowHeight = row.getHeight();
- int columnWidth = column.getWidth();
-
- String message = "Registered Click At " + rowIndex + "," + columnIndex;
-
- Label heightLabel = new Label(String.format("The row's height is %d (%s)",
- rowHeight,
- rowHeight == -1 ? "default" : (row.isRelative() ? "relative" : "absolute")));
- Label widthLabel = new Label(String.format("The column's width is %d (%s)",
- columnWidth,
- columnWidth == -1 ? "default" : (column.isRelative() ? "relative" : "absolute")));
-
- BoxPane body = new BoxPane(Orientation.VERTICAL);
- body.add(heightLabel);
- body.add(widthLabel);
+ tablePane.getComponentMouseButtonListeners().add(
+ new ComponentMouseButtonListener.Adapter() {
+ @Override
+ public boolean mouseClick(Component component, Mouse.Button button, int x, int y,
+ int count) {
+ int rowIndex = tablePane.getRowAt(y);
+ int columnIndex = tablePane.getColumnAt(x);
+
+ if (rowIndex >= 0 && columnIndex >= 0) {
+ TablePane.Row row = tablePane.getRows().get(rowIndex);
+ TablePane.Column column = tablePane.getColumns().get(columnIndex);
+
+ int rowHeight = row.getHeight();
+ int columnWidth = column.getWidth();
+
+ String message = "Registered Click At " + rowIndex + "," + columnIndex;
+
+ Label heightLabel = new Label(String.format("The row's height is %d (%s)",
+ rowHeight, rowHeight == -1 ? "default" : (row.isRelative() ? "relative"
+ : "absolute")));
+ Label widthLabel = new Label(String.format("The column's width is %d (%s)",
+ columnWidth, columnWidth == -1 ? "default"
+ : (column.isRelative() ? "relative" : "absolute")));
+
+ BoxPane body = new BoxPane(Orientation.VERTICAL);
+ body.add(heightLabel);
+ body.add(widthLabel);
- Prompt.prompt(MessageType.INFO, message, body, SimpleTablePanes.this);
- }
+ Prompt.prompt(MessageType.INFO, message, body, SimpleTablePanes.this);
+ }
- return false;
- }
- });
+ return false;
+ }
+ });
}
}
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/TablePanes.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/TablePanes.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/TablePanes.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/TablePanes.java Fri Oct 4 23:45:40 2013
@@ -44,7 +44,8 @@ public class TablePanes extends Window i
private int y = -1;
@Override
- public boolean configureContextMenu(Component component, Menu menu, int xArgument, int yArgument) {
+ public boolean configureContextMenu(Component component, Menu menu, int xArgument,
+ int yArgument) {
this.x = xArgument;
this.y = yArgument;
@@ -103,7 +104,7 @@ public class TablePanes extends Window i
bxmlSerializer.getNamespace().put("component", component);
try {
- sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
+ sheet = (Sheet) bxmlSerializer.readObject(TablePanes.class,
"table_panes_configure_cell.bxml");
} catch (SerializationException exception) {
throw new RuntimeException(exception);
@@ -127,7 +128,7 @@ public class TablePanes extends Window i
bxmlSerializer.getNamespace().put("row", row);
try {
- sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
+ sheet = (Sheet) bxmlSerializer.readObject(TablePanes.class,
"table_panes_configure_row.bxml");
} catch (SerializationException exception) {
throw new RuntimeException(exception);
@@ -162,7 +163,7 @@ public class TablePanes extends Window i
bxmlSerializer.getNamespace().put("row", row);
try {
- sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
+ sheet = (Sheet) bxmlSerializer.readObject(TablePanes.class,
"table_panes_configure_row.bxml");
} catch (SerializationException exception) {
throw new RuntimeException(exception);
@@ -209,7 +210,7 @@ public class TablePanes extends Window i
bxmlSerializer.getNamespace().put("column", column);
try {
- sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
+ sheet = (Sheet) bxmlSerializer.readObject(TablePanes.class,
"table_panes_configure_column.bxml");
} catch (SerializationException exception) {
throw new RuntimeException(exception);
@@ -245,7 +246,7 @@ public class TablePanes extends Window i
bxmlSerializer.getNamespace().put("column", column);
try {
- sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
+ sheet = (Sheet) bxmlSerializer.readObject(TablePanes.class,
"table_panes_configure_column.bxml");
} catch (SerializationException exception) {
throw new RuntimeException(exception);
@@ -289,10 +290,10 @@ public class TablePanes extends Window i
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- tablePane = (TablePane)namespace.get("tablePane");
- cellSection = (Menu.Section)namespace.get("cellSection");
- rowSection = (Menu.Section)namespace.get("rowSection");
- columnSection = (Menu.Section)namespace.get("columnSection");
+ tablePane = (TablePane) namespace.get("tablePane");
+ cellSection = (Menu.Section) namespace.get("cellSection");
+ rowSection = (Menu.Section) namespace.get("rowSection");
+ columnSection = (Menu.Section) namespace.get("columnSection");
tablePane.setMenuHandler(contextMenuHandler);
}
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListButtons.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListButtons.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListButtons.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListButtons.java Fri Oct 4 23:45:40 2013
@@ -35,22 +35,25 @@ public class ListButtons extends Window
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- listButton = (ListButton)namespace.get("listButton");
- imageView = (ImageView)namespace.get("imageView");
+ listButton = (ListButton) namespace.get("listButton");
+ imageView = (ImageView) namespace.get("imageView");
listButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener.Adapter() {
@Override
- public void selectedItemChanged(ListButton listButtonArgument, Object previousSelectedItem) {
+ public void selectedItemChanged(ListButton listButtonArgument,
+ Object previousSelectedItem) {
Object selectedItem = listButtonArgument.getSelectedItem();
if (selectedItem != null) {
// Get the image URL for the selected item
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- URL imageURL = classLoader.getResource("org/apache/pivot/tutorials/" + selectedItem);
+ URL imageURL = classLoader.getResource("org/apache/pivot/tutorials/"
+ + selectedItem);
- // If the image has not been added to the resource cache yet,
+ // If the image has not been added to the resource cache
+ // yet,
// add it
- Image image = (Image)ApplicationContext.getResourceCache().get(imageURL);
+ Image image = (Image) ApplicationContext.getResourceCache().get(imageURL);
if (image == null) {
try {
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/ListViews.java Fri Oct 4 23:45:40 2013
@@ -35,8 +35,8 @@ public class ListViews extends Window im
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- selectionLabel = (Label)namespace.get("selectionLabel");
- listView = (ListView)namespace.get("listView");
+ selectionLabel = (Label) namespace.get("selectionLabel");
+ listView = (ListView) namespace.get("listView");
listView.getListViewSelectionListeners().add(new ListViewSelectionListener() {
@Override
@@ -50,7 +50,8 @@ public class ListViews extends Window im
}
@Override
- public void selectedRangesChanged(ListView listViewArgument, Sequence<Span> previousSelectedRanges) {
+ public void selectedRangesChanged(ListView listViewArgument,
+ Sequence<Span> previousSelectedRanges) {
if (previousSelectedRanges != null
&& previousSelectedRanges != listViewArgument.getSelectedRanges()) {
updateSelection(listViewArgument);
@@ -70,18 +71,18 @@ public class ListViews extends Window im
for (int i = 0, n = selectedRanges.getLength(); i < n; i++) {
Span selectedRange = selectedRanges.get(i);
- for (int j = selectedRange.start;
- j <= selectedRange.end;
- j++) {
+ for (int j = selectedRange.start; j <= selectedRange.end; j++) {
if (selectionText.length() > 0) {
selectionText += ", ";
}
Object item = listViewArgument.getListData().get(j);
String text;
- if (item instanceof ListItem) { // item is a listItem (for example because it has an image)
+ if (item instanceof ListItem) { // item is a listItem
+ // (for example because
+ // it has an image)
text = ((ListItem) item).getText();
- } else { // item is a standard item for listData
+ } else { // item is a standard item for listData
text = item.toString();
}
selectionText += text;
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/RepeatableListButtons.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/RepeatableListButtons.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/RepeatableListButtons.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/lists/RepeatableListButtons.java Fri Oct 4 23:45:40 2013
@@ -26,12 +26,12 @@ import org.apache.pivot.util.Resources;
import org.apache.pivot.wtk.Action;
import org.apache.pivot.wtk.BoxPane;
import org.apache.pivot.wtk.Button;
+import org.apache.pivot.wtk.Button.State;
import org.apache.pivot.wtk.ButtonStateListener;
import org.apache.pivot.wtk.Checkbox;
import org.apache.pivot.wtk.Component;
import org.apache.pivot.wtk.ListButton;
import org.apache.pivot.wtk.Window;
-import org.apache.pivot.wtk.Button.State;
import org.apache.pivot.wtk.content.ColorItem;
public class RepeatableListButtons extends Window implements Bindable {
@@ -43,11 +43,11 @@ public class RepeatableListButtons exten
private Action applyColorAction = new Action() {
@Override
public void perform(Component source) {
- ColorItem colorItem = (ColorItem)colorListButton.getButtonData();
+ ColorItem colorItem = (ColorItem) colorListButton.getButtonData();
Color color = colorItem.getColor();
for (Component component : checkboxBoxPane) {
- Checkbox checkbox = (Checkbox)component;
+ Checkbox checkbox = (Checkbox) component;
if (checkbox.isSelected()) {
checkbox.getStyles().put("color", color);
checkbox.setSelected(false);
@@ -63,8 +63,8 @@ public class RepeatableListButtons exten
@Override
public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
- colorListButton = (ListButton)namespace.get("colorListButton");
- checkboxBoxPane = (BoxPane)namespace.get("checkboxBoxPane");
+ colorListButton = (ListButton) namespace.get("colorListButton");
+ checkboxBoxPane = (BoxPane) namespace.get("checkboxBoxPane");
ButtonStateListener buttonStateListener = new ButtonStateListener() {
@Override
@@ -79,8 +79,8 @@ public class RepeatableListButtons exten
}
};
- ArrayList<String> numbers = new ArrayList<>("One", "Two", "Three", "Four", "Five",
- "Six", "Seven", "Eight", "Nine", "Ten");
+ ArrayList<String> numbers = new ArrayList<>("One", "Two", "Three", "Four", "Five", "Six",
+ "Seven", "Eight", "Nine", "Ten");
for (String number : numbers) {
Checkbox checkbox = new Checkbox(number);
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/localization/Localization.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/localization/Localization.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/localization/Localization.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/localization/Localization.java Fri Oct 4 23:45:40 2013
@@ -44,7 +44,7 @@ public class Localization extends Applic
Font font = theme.getFont();
// Search for a font that can support the sample string
- String sampleResource = (String)resources.get("firstName");
+ String sampleResource = (String) resources.get("firstName");
if (font.canDisplayUpTo(sampleResource) != -1) {
Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
@@ -57,7 +57,8 @@ public class Localization extends Applic
}
BXMLSerializer bxmlSerializer = new BXMLSerializer();
- window = (Window)bxmlSerializer.readObject(Localization.class.getResource("localization.bxml"), resources);
+ window = (Window) bxmlSerializer.readObject(
+ Localization.class.getResource("localization.bxml"), resources);
window.open(display);
}
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menus/ContextMenus.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menus/ContextMenus.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menus/ContextMenus.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menus/ContextMenus.java Fri Oct 4 23:45:40 2013
@@ -41,7 +41,7 @@ public class ContextMenus extends Window
whatIsThisMenuItem.setAction(new Action() {
@Override
public void perform(Component source) {
- String description = (String)descendant.getUserData().get("description");
+ String description = (String) descendant.getUserData().get("description");
String message = "This is a " + description + ".";
Prompt.prompt(message, ContextMenus.this);