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 2014/09/03 11:09:31 UTC
svn commit: r1622192 - in /pivot/trunk: tests/src/org/apache/pivot/tests/
tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/
wtk/src/org/apache/pivot/wtk/skin/
Author: smartini
Date: Wed Sep 3 09:09:31 2014
New Revision: 1622192
URL: http://svn.apache.org/r1622192
Log:
cleanup: clarified/commented unused code (real, or false positive and there add SuppressWarnings annotation)
Modified:
pivot/trunk/tests/src/org/apache/pivot/tests/ColorPaletteTest.java
pivot/trunk/tests/src/org/apache/pivot/tests/SheetTest.java
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/FakeWindowSkin.java
pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkin.java
Modified: pivot/trunk/tests/src/org/apache/pivot/tests/ColorPaletteTest.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/ColorPaletteTest.java?rev=1622192&r1=1622191&r2=1622192&view=diff
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/ColorPaletteTest.java (original)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/ColorPaletteTest.java Wed Sep 3 09:09:31 2014
@@ -36,14 +36,15 @@ import org.apache.pivot.wtk.Window;
public class ColorPaletteTest extends Application.Adapter {
private Window window = null;
+ @SuppressWarnings("unused")
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
Theme theme = Theme.getTheme();
TablePane tablePane = new TablePane();
- new TablePane.Column(tablePane, 1, true);
- new TablePane.Column(tablePane, 1, true);
- new TablePane.Column(tablePane, 1, true);
+ new TablePane.Column(tablePane, 1, true); // note: this is useful, even if not used directly
+ new TablePane.Column(tablePane, 1, true); // note: this is useful, even if not used directly
+ new TablePane.Column(tablePane, 1, true); // note: this is useful, even if not used directly
int numberOfPaletteColors = theme.getNumberOfPaletteColors();
// ArrayList<String> colors = new ArrayList<>(numberOfPaletteColors);
Modified: pivot/trunk/tests/src/org/apache/pivot/tests/SheetTest.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/SheetTest.java?rev=1622192&r1=1622191&r2=1622192&view=diff
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/SheetTest.java (original)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/SheetTest.java Wed Sep 3 09:09:31 2014
@@ -45,6 +45,7 @@ public class SheetTest extends Applicati
private Frame frame = null;
private Sheet sheet = null;
+ @SuppressWarnings("unused")
@Override
public void startup(final Display display, Map<String, String> properties) throws Exception {
Picture picture = (Picture) Image.load(getClass().getResource("IMG_0767_2.jpg"));
@@ -63,7 +64,7 @@ public class SheetTest extends Applicati
final TablePane tablePane = new TablePane();
tablePane.setPreferredSize(320, 240);
- new TablePane.Column(tablePane, 1, true);
+ new TablePane.Column(tablePane, 1, true); // note: this is useful, even if not used directly
TablePane.Row row0 = new TablePane.Row(tablePane, 1, true);
TablePane.Row row1 = new TablePane.Row(tablePane, -1);
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/FakeWindowSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/FakeWindowSkin.java?rev=1622192&r1=1622191&r2=1622192&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/FakeWindowSkin.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/bxmlexplorer/FakeWindowSkin.java Wed Sep 3 09:09:31 2014
@@ -176,6 +176,7 @@ public class FakeWindowSkin extends Cont
// private Color contentBevelColor; // TODO: future use
+ @SuppressWarnings("unused")
public FakeWindowSkin() {
TerraTheme theme = (TerraTheme) Theme.getTheme();
setBackgroundColor(theme.getColor(10));
@@ -191,8 +192,8 @@ public class FakeWindowSkin extends Cont
// The title bar table pane contains two nested box panes: one for
// the title contents and the other for the buttons
- new TablePane.Column(titleBarTablePane, 1, true);
- new TablePane.Column(titleBarTablePane, -1);
+ new TablePane.Column(titleBarTablePane, 1, true); // note: this is useful, even if not used directly
+ new TablePane.Column(titleBarTablePane, -1); // note: this is useful, even if not used directly
TablePane.Row titleRow = new TablePane.Row(titleBarTablePane, -1);
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkin.java?rev=1622192&r1=1622191&r2=1622192&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkin.java Wed Sep 3 09:09:31 2014
@@ -880,9 +880,9 @@ public class TextPaneSkin extends Contai
Keyboard.Modifier commandModifier = Platform.getCommandModifier();
boolean commandPressed = Keyboard.isPressed(commandModifier);
- boolean wordNavPressed = Keyboard.isPressed(Platform.getWordNavigationModifier());
+ // boolean wordNavPressed = Keyboard.isPressed(Platform.getWordNavigationModifier());
boolean shiftPressed = Keyboard.isPressed(Keyboard.Modifier.SHIFT);
- boolean ctrlPressed = Keyboard.isPressed(Keyboard.Modifier.CTRL);
+ // boolean ctrlPressed = Keyboard.isPressed(Keyboard.Modifier.CTRL);
boolean metaPressed = Keyboard.isPressed(Keyboard.Modifier.META);
boolean isEditable = textPane.isEditable();