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 [30/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/wtk/src/org/apache/pivot/wtk/Menu.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Menu.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Menu.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Menu.java Fri Oct 4 23:45:40 2013
@@ -35,8 +35,8 @@ public class Menu extends Container {
*/
@DefaultProperty("menu")
public static class Item extends Button {
- private static class ItemListenerList extends WTKListenerList<ItemListener>
- implements ItemListener {
+ private static class ItemListenerList extends WTKListenerList<ItemListener> implements
+ ItemListener {
@Override
public void menuChanged(Item item, Menu previousMenu) {
for (ItemListener listener : this) {
@@ -74,8 +74,7 @@ public class Menu extends Container {
@Override
protected void setParent(Container parent) {
- if (parent != null
- && !(parent instanceof Menu)) {
+ if (parent != null && !(parent instanceof Menu)) {
throw new IllegalArgumentException("Parent must be an instance of "
+ Menu.class.getName());
}
@@ -103,8 +102,7 @@ public class Menu extends Container {
}
public void setMenu(Menu menu) {
- if (menu != null
- && menu.getItem() != null) {
+ if (menu != null && menu.getItem() != null) {
throw new IllegalArgumentException("menu already belongs to an item.");
}
@@ -130,9 +128,7 @@ public class Menu extends Container {
}
public void setActive(boolean active) {
- if (active
- && (getParent() == null
- || !isEnabled())) {
+ if (active && (getParent() == null || !isEnabled())) {
throw new IllegalStateException();
}
@@ -140,7 +136,7 @@ public class Menu extends Container {
this.active = active;
// Update the active item
- Menu menuLocal = (Menu)getParent();
+ Menu menuLocal = (Menu) getParent();
Item activeItem = menuLocal.getActiveItem();
if (active) {
@@ -153,8 +149,7 @@ public class Menu extends Container {
if (activeItem != null) {
activeItem.setActive(false);
}
- }
- else {
+ } else {
// If this item is currently active, clear the
// selection
if (activeItem == this) {
@@ -183,7 +178,7 @@ public class Menu extends Container {
Item item = this;
while (item != null) {
- Menu menuLocal = (Menu)item.getParent();
+ Menu menuLocal = (Menu) item.getParent();
if (menuLocal == null) {
item = null;
@@ -206,7 +201,7 @@ public class Menu extends Container {
public interface ItemListener {
/**
* Called when an item's menu has changed.
- *
+ *
* @param item
* @param previousMenu
*/
@@ -214,19 +209,19 @@ public class Menu extends Container {
/**
* Called when an item's active state has changed.
- *
+ *
* @param item
*/
public void activeChanged(Item item);
}
/**
- * Class representing a menu section. A section is a grouping of menu
- * items within a menu.
+ * Class representing a menu section. A section is a grouping of menu items
+ * within a menu.
*/
public static class Section implements Sequence<Item>, Iterable<Item> {
- private static class SectionListenerList extends WTKListenerList<SectionListener>
- implements SectionListener {
+ private static class SectionListenerList extends WTKListenerList<SectionListener> implements
+ SectionListener {
@Override
public void itemInserted(Menu.Section section, int index) {
for (SectionListener listener : this) {
@@ -361,7 +356,7 @@ public class Menu extends Container {
public interface SectionListener {
/**
* Called when a menu item has been inserted.
- *
+ *
* @param section
* @param index
*/
@@ -369,7 +364,7 @@ public class Menu extends Container {
/**
* Called when menu items have been removed.
- *
+ *
* @param section
* @param index
* @param removed
@@ -378,7 +373,7 @@ public class Menu extends Container {
/**
* Called when a section's name has changed.
- *
+ *
* @param section
* @param previousName
*/
@@ -474,8 +469,8 @@ public class Menu extends Container {
}
}
- private static class MenuListenerList extends WTKListenerList<MenuListener>
- implements MenuListener {
+ private static class MenuListenerList extends WTKListenerList<MenuListener> implements
+ MenuListener {
@Override
public void sectionInserted(Menu menu, int index) {
for (MenuListener listener : this) {
@@ -498,8 +493,8 @@ public class Menu extends Container {
}
}
- private static class MenuItemSelectionListenerList extends WTKListenerList<MenuItemSelectionListener>
- implements MenuItemSelectionListener {
+ private static class MenuItemSelectionListenerList extends
+ WTKListenerList<MenuItemSelectionListener> implements MenuItemSelectionListener {
@Override
public void itemSelected(Menu.Item menuItem) {
for (MenuItemSelectionListener listener : this) {
@@ -552,7 +547,7 @@ public class Menu extends Container {
Component component = get(i);
for (Section section : sections) {
- if (section.indexOf((Menu.Item)component) >= 0) {
+ if (section.indexOf((Menu.Item) component) >= 0) {
throw new UnsupportedOperationException();
}
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuBar.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuBar.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuBar.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuBar.java Fri Oct 4 23:45:40 2013
@@ -35,8 +35,8 @@ public class MenuBar extends Container {
*/
@DefaultProperty("menu")
public static class Item extends Button {
- private static class ItemListenerList extends WTKListenerList<ItemListener>
- implements ItemListener {
+ private static class ItemListenerList extends WTKListenerList<ItemListener> implements
+ ItemListener {
@Override
public void menuChanged(Item item, Menu previousMenu) {
for (ItemListener listener : this) {
@@ -72,8 +72,7 @@ public class MenuBar extends Container {
@Override
protected void setParent(Container parent) {
- if (parent != null
- && !(parent instanceof MenuBar)) {
+ if (parent != null && !(parent instanceof MenuBar)) {
throw new IllegalArgumentException("Parent must be an instance of "
+ MenuBar.class.getName());
}
@@ -97,8 +96,7 @@ public class MenuBar extends Container {
}
public void setMenu(Menu menu) {
- if (menu != null
- && menu.getItem() != null) {
+ if (menu != null && menu.getItem() != null) {
throw new IllegalArgumentException("menu already belongs to an item.");
}
@@ -115,9 +113,7 @@ public class MenuBar extends Container {
}
public void setActive(boolean active) {
- if (active
- && (getParent() == null
- || !isEnabled())) {
+ if (active && (getParent() == null || !isEnabled())) {
throw new IllegalStateException();
}
@@ -125,7 +121,7 @@ public class MenuBar extends Container {
this.active = active;
// Update the active item
- MenuBar menuBar = (MenuBar)getParent();
+ MenuBar menuBar = (MenuBar) getParent();
Item activeItem = menuBar.getActiveItem();
if (active) {
@@ -138,8 +134,7 @@ public class MenuBar extends Container {
if (activeItem != null) {
activeItem.setActive(false);
}
- }
- else {
+ } else {
// If this item is currently active, clear the
// selection
if (activeItem == this) {
@@ -158,8 +153,7 @@ public class MenuBar extends Container {
@Override
public boolean isEnabled() {
- return (super.isEnabled()
- && menu != null);
+ return (super.isEnabled() && menu != null);
}
public ListenerList<ItemListener> getItemListeners() {
@@ -173,7 +167,7 @@ public class MenuBar extends Container {
public interface ItemListener {
/**
* Called when an item's menu has changed.
- *
+ *
* @param item
* @param previousMenu
*/
@@ -181,7 +175,7 @@ public class MenuBar extends Container {
/**
* Called when an item's active state has changed.
- *
+ *
* @param item
*/
public void activeChanged(Item item);
@@ -259,8 +253,8 @@ public class MenuBar extends Container {
}
}
- private static class MenuBarListenerList extends WTKListenerList<MenuBarListener>
- implements MenuBarListener {
+ private static class MenuBarListenerList extends WTKListenerList<MenuBarListener> implements
+ MenuBarListener {
@Override
public void itemInserted(MenuBar menuBar, int index) {
for (MenuBarListener listener : this) {
@@ -316,7 +310,7 @@ public class MenuBar extends Container {
for (int i = index, n = index + count; i < n; i++) {
Component component = get(i);
- if (items.indexOf((Item)component) >= 0) {
+ if (items.indexOf((Item) component) >= 0) {
throw new UnsupportedOperationException();
}
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuBarListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuBarListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuBarListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuBarListener.java Fri Oct 4 23:45:40 2013
@@ -44,7 +44,7 @@ public interface MenuBarListener {
/**
* Called when a menu bar item has been inserted.
- *
+ *
* @param menuBar
* @param index
*/
@@ -52,7 +52,7 @@ public interface MenuBarListener {
/**
* Called when menu bar items have been removed.
- *
+ *
* @param menuBar
* @param index
* @param removed
@@ -61,7 +61,7 @@ public interface MenuBarListener {
/**
* Called when a menu bar's active item has changed.
- *
+ *
* @param menuBar
* @param previousActiveItem
*/
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButton.java Fri Oct 4 23:45:40 2013
@@ -20,16 +20,14 @@ import org.apache.pivot.beans.DefaultPro
import org.apache.pivot.util.ListenerList;
import org.apache.pivot.wtk.content.ButtonDataRenderer;
-
/**
* Component that allows a user to select one of several menu options. The
- * options are hidden until the user pushes the button.
- * <p>
- * The repeatable flag is used to trigger "split button" behavior.
- * When true, the button reflects the selected value and allows a user to
- * repeatedly press the left half of the button, firing additional menu
- * selection events for the selected item. Pressing the right half of the
- * button continues to fire button press events and display the menu.
+ * options are hidden until the user pushes the button. <p> The repeatable flag
+ * is used to trigger "split button" behavior. When true, the button reflects
+ * the selected value and allows a user to repeatedly press the left half of the
+ * button, firing additional menu selection events for the selected item.
+ * Pressing the right half of the button continues to fire button press events
+ * and display the menu.
*/
@DefaultProperty("menu")
public class MenuButton extends Button {
@@ -44,9 +42,9 @@ public class MenuButton extends Button {
}
/**
- * MenuButton skin interface. MenuButton skins must implement
- * this interface to facilitate additional communication between the
- * component and the skin.
+ * MenuButton skin interface. MenuButton skins must implement this interface
+ * to facilitate additional communication between the component and the
+ * skin.
*/
public interface Skin {
public Window getMenuPopup();
@@ -90,8 +88,7 @@ public class MenuButton extends Button {
}
public void setMenu(Menu menu) {
- if (menu != null
- && menu.getItem() != null) {
+ if (menu != null && menu.getItem() != null) {
throw new IllegalArgumentException("menu already belongs to an item.");
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButtonListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButtonListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButtonListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuButtonListener.java Fri Oct 4 23:45:40 2013
@@ -22,7 +22,7 @@ package org.apache.pivot.wtk;
public interface MenuButtonListener {
/**
* Called when a menu button's menu has changed.
- *
+ *
* @param menuButton
* @param previousMenu
*/
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuHandler.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuHandler.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuHandler.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuHandler.java Fri Oct 4 23:45:40 2013
@@ -41,31 +41,32 @@ public interface MenuHandler {
}
/**
- * Called when a component to which this handler is attached gains the focus.
- *
+ * Called when a component to which this handler is attached gains the
+ * focus.
+ *
* @param component
* @param menuBar
*/
public void configureMenuBar(Component component, MenuBar menuBar);
/**
- * Called when a component to which this handler is attached loses the focus.
- *
+ * Called when a component to which this handler is attached loses the
+ * focus.
+ *
* @param component
* @param menuBar
*/
public void cleanupMenuBar(Component component, MenuBar menuBar);
/**
- * Called when the user right-clicks on a component to which this handler is attached.
- *
+ * Called when the user right-clicks on a component to which this handler is
+ * attached.
+ *
* @param component
* @param menu
* @param x
* @param y
- *
- * @return
- * <tt>true</tt> to stop propagation of context menu configuration;
+ * @return <tt>true</tt> to stop propagation of context menu configuration;
* <tt>false</tt> to allow it to continue.
*/
public boolean configureContextMenu(Component component, Menu menu, int x, int y);
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuItemSelectionListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuItemSelectionListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuItemSelectionListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuItemSelectionListener.java Fri Oct 4 23:45:40 2013
@@ -22,7 +22,7 @@ package org.apache.pivot.wtk;
public interface MenuItemSelectionListener {
/**
* Called when a descendant item of this menu has been selected.
- *
+ *
* @param menuItem
*/
public void itemSelected(Menu.Item menuItem);
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuListener.java Fri Oct 4 23:45:40 2013
@@ -44,7 +44,7 @@ public interface MenuListener {
/**
* Called when a menu section has been inserted.
- *
+ *
* @param menu
* @param index
*/
@@ -52,7 +52,7 @@ public interface MenuListener {
/**
* Called when menu sections have been removed.
- *
+ *
* @param menu
* @param index
* @param removed
@@ -61,7 +61,7 @@ public interface MenuListener {
/**
* Called when a menu's active item has changed.
- *
+ *
* @param menu
* @param previousActiveItem
*/
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopup.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopup.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopup.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopup.java Fri Oct 4 23:45:40 2013
@@ -25,8 +25,8 @@ import org.apache.pivot.util.Vote;
*/
@DefaultProperty("menu")
public class MenuPopup extends Window {
- private static class MenuPopupListenerList extends WTKListenerList<MenuPopupListener>
- implements MenuPopupListener {
+ private static class MenuPopupListenerList extends WTKListenerList<MenuPopupListener> implements
+ MenuPopupListener {
@Override
public void menuChanged(MenuPopup menuPopup, Menu previousMenu) {
for (MenuPopupListener listener : this) {
@@ -156,7 +156,7 @@ public class MenuPopup extends Window {
if (isClosed()) {
menuPopupStateListeners.menuPopupClosed(this);
}
- } else if (vote == Vote.DENY){
+ } else if (vote == Vote.DENY) {
closing = false;
menuPopupStateListeners.menuPopupCloseVetoed(this, vote);
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopupListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopupListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopupListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopupListener.java Fri Oct 4 23:45:40 2013
@@ -22,7 +22,7 @@ package org.apache.pivot.wtk;
public interface MenuPopupListener {
/**
* Called when a menu popup's menu has changed.
- *
+ *
* @param menuPopup
* @param previousMenu
*/
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopupStateListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopupStateListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopupStateListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MenuPopupStateListener.java Fri Oct 4 23:45:40 2013
@@ -44,7 +44,7 @@ public interface MenuPopupStateListener
/**
* Called to preview a menu popup close event.
- *
+ *
* @param menuPopup
* @param immediate
*/
@@ -52,7 +52,7 @@ public interface MenuPopupStateListener
/**
* Called when a menu popup close event has been vetoed.
- *
+ *
* @param menuPopup
* @param reason
*/
@@ -60,7 +60,7 @@ public interface MenuPopupStateListener
/**
* Called when a menu popup has closed.
- *
+ *
* @param menuPopup
*/
public void menuPopupClosed(MenuPopup menuPopup);
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MessageType.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MessageType.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MessageType.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MessageType.java Fri Oct 4 23:45:40 2013
@@ -20,8 +20,5 @@ package org.apache.pivot.wtk;
* Enumeration defining a message's type.
*/
public enum MessageType {
- ERROR,
- WARNING,
- QUESTION,
- INFO
+ ERROR, WARNING, QUESTION, INFO
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Meter.java Fri Oct 4 23:45:40 2013
@@ -22,8 +22,8 @@ import org.apache.pivot.util.ListenerLis
* Component that displays progress information.
*/
public class Meter extends Component {
- private static class MeterListenerList extends WTKListenerList<MeterListener>
- implements MeterListener {
+ private static class MeterListenerList extends WTKListenerList<MeterListener> implements
+ MeterListener {
@Override
public void orientationChanged(Meter meter) {
for (MeterListener listener : this) {
@@ -66,8 +66,7 @@ public class Meter extends Component {
public void setPercentage(double percentage) {
if (percentage < 0.0 || percentage > 1.0) {
- throw new IllegalArgumentException
- ("Percentage must be a number between 0 and 1");
+ throw new IllegalArgumentException("Percentage must be a number between 0 and 1");
}
double previousPercentage = this.percentage;
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MeterListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MeterListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MeterListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MeterListener.java Fri Oct 4 23:45:40 2013
@@ -42,7 +42,7 @@ public interface MeterListener {
/**
* Called when a meter's percentage value has changed.
- *
+ *
* @param meter
* @param previousPercentage
*/
@@ -50,7 +50,7 @@ public interface MeterListener {
/**
* Called when a meter's text has changed.
- *
+ *
* @param meter
* @param previousText
*/
@@ -58,9 +58,8 @@ public interface MeterListener {
/**
* Called when a sliders's orientation has changed.
- *
- * @param meter
- * The source of the event.
+ *
+ * @param meter The source of the event.
*/
public void orientationChanged(Meter meter);
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Mouse.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Mouse.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Mouse.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Mouse.java Fri Oct 4 23:45:40 2013
@@ -26,9 +26,7 @@ public final class Mouse {
* Enumeration representing mouse buttons.
*/
public enum Button {
- LEFT,
- RIGHT,
- MIDDLE;
+ LEFT, RIGHT, MIDDLE;
public int getMask() {
return 1 << ordinal();
@@ -39,8 +37,7 @@ public final class Mouse {
* Enumeration defining supported scroll types.
*/
public enum ScrollType {
- UNIT,
- BLOCK
+ UNIT, BLOCK
}
private static int buttons = 0;
@@ -60,11 +57,9 @@ public final class Mouse {
/**
* Tests the pressed state of a button.
- *
+ *
* @param button
- *
- * @return
- * <tt>true</tt> if the button is pressed; <tt>false</tt>, otherwise.
+ * @return <tt>true</tt> if the button is pressed; <tt>false</tt>, otherwise.
*/
public static boolean isPressed(Button button) {
return (buttons & button.getMask()) > 0;
@@ -80,10 +75,9 @@ public final class Mouse {
/**
* "Captures" the mouse, causing all mouse input to be delegated to the
* given component rather than propagating down the component hierarchy.
- *
- * @param capturerArgument
- * The component that wants to capture the mouse. The mouse pointer must
- * currently be over the component.
+ *
+ * @param capturerArgument The component that wants to capture the mouse.
+ * The mouse pointer must currently be over the component.
*/
public static void capture(Component capturerArgument) {
if (capturerArgument == null) {
@@ -118,8 +112,7 @@ public final class Mouse {
descendant = display.getDescendantAt(location.x, location.y);
}
- while (descendant != null
- && descendant != capturer) {
+ while (descendant != null && descendant != capturer) {
descendant = descendant.getParent();
}
@@ -139,10 +132,9 @@ public final class Mouse {
/**
* Returns the mouse capturer.
- *
- * @return
- * The component that has captured the mouse, or <tt>null</tt> if the mouse
- * is not currently captured.
+ *
+ * @return The component that has captured the mouse, or <tt>null</tt> if
+ * the mouse is not currently captured.
*/
public static Component getCapturer() {
return capturer;
@@ -150,9 +142,8 @@ public final class Mouse {
/**
* Returns the current cursor.
- *
- * @throws IllegalStateException
- * If the mouse is not currently captured.
+ *
+ * @throws IllegalStateException If the mouse is not currently captured.
*/
public static Cursor getCursor() {
if (capturer == null) {
@@ -246,11 +237,9 @@ public final class Mouse {
/**
* Sets the cursor to an explicit value.
- *
+ *
* @param cursor
- *
- * @throws IllegalStateException
- * If the mouse is not currently captured.
+ * @throws IllegalStateException If the mouse is not currently captured.
*/
public static void setCursor(Cursor cursor) {
if (cursor == null) {
@@ -268,7 +257,7 @@ public final class Mouse {
/**
* Sets the cursor based on a given component.
- *
+ *
* @param component
*/
public static void setCursor(final Component component) {
@@ -285,8 +274,7 @@ public final class Mouse {
if (componentOrParent.isEnabled()) {
cursor = componentOrParent.getCursor();
- while (cursor == null
- && componentOrParent != null
+ while (cursor == null && componentOrParent != null
&& !(componentOrParent instanceof Display)) {
componentOrParent = componentOrParent.getParent();
if (componentOrParent != null) {
@@ -298,8 +286,8 @@ public final class Mouse {
if (componentOrParent != null) {
Display display = componentOrParent.getDisplay();
ApplicationContext.DisplayHost displayHost = display.getDisplayHost();
- displayHost.setCursor((cursor == null) ? java.awt.Cursor.getDefaultCursor() :
- getCursor(cursor));
+ displayHost.setCursor((cursor == null) ? java.awt.Cursor.getDefaultCursor()
+ : getCursor(cursor));
}
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MovieView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MovieView.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MovieView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MovieView.java Fri Oct 4 23:45:40 2013
@@ -20,14 +20,13 @@ import org.apache.pivot.beans.DefaultPro
import org.apache.pivot.util.ListenerList;
import org.apache.pivot.wtk.media.Movie;
-
/**
* Component that plays a movie.
*/
@DefaultProperty("movie")
public class MovieView extends Component {
- private static class MovieViewListenerList extends WTKListenerList<MovieViewListener>
- implements MovieViewListener {
+ private static class MovieViewListenerList extends WTKListenerList<MovieViewListener> implements
+ MovieViewListener {
@Override
public void movieChanged(MovieView movieView, Movie previousMovie) {
for (MovieViewListener listener : this) {
@@ -49,9 +48,8 @@ public class MovieView extends Component
/**
* Creates an movie view with the given movie.
- *
- * @param movie
- * The initial movie to set, or <tt>null</tt> for no movie.
+ *
+ * @param movie The initial movie to set, or <tt>null</tt> for no movie.
*/
public MovieView(Movie movie) {
setMovie(movie);
@@ -61,9 +59,8 @@ public class MovieView extends Component
/**
* Returns the movie view's current movie.
- *
- * @return
- * The current movie, or <tt>null</tt> if no movie is set.
+ *
+ * @return The current movie, or <tt>null</tt> if no movie is set.
*/
public Movie getMovie() {
return movie;
@@ -71,9 +68,8 @@ public class MovieView extends Component
/**
* Sets the movie view's current movie.
- *
- * @param movie
- * The movie to set, or <tt>null</tt> for no movie.
+ *
+ * @param movie The movie to set, or <tt>null</tt> for no movie.
*/
public void setMovie(Movie movie) {
Movie previousMovie = this.movie;
@@ -86,9 +82,8 @@ public class MovieView extends Component
/**
* Returns the movie view listener list.
- *
- * @return
- * The movie view listener list.
+ *
+ * @return The movie view listener list.
*/
public ListenerList<MovieViewListener> getMovieViewListeners() {
return movieViewListeners;
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/MovieViewListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/MovieViewListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/MovieViewListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/MovieViewListener.java Fri Oct 4 23:45:40 2013
@@ -24,7 +24,7 @@ import org.apache.pivot.wtk.media.Movie;
public interface MovieViewListener {
/**
* Called when an movie view's movie has changed.
- *
+ *
* @param movieView
* @param previousMovie
*/
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Orientation.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Orientation.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Orientation.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Orientation.java Fri Oct 4 23:45:40 2013
@@ -20,6 +20,5 @@ package org.apache.pivot.wtk;
* Enumeration defining a two-dimensional orientation.
*/
public enum Orientation {
- HORIZONTAL,
- VERTICAL
+ HORIZONTAL, VERTICAL
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Platform.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Platform.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Platform.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Platform.java Fri Oct 4 23:45:40 2013
@@ -78,8 +78,7 @@ public class Platform {
Object fmHint = null;
Toolkit toolkit = Toolkit.getDefaultToolkit();
- java.util.Map<?, ?> fontDesktopHints =
- (java.util.Map<?, ?>)toolkit.getDesktopProperty("awt.font.desktophints");
+ java.util.Map<?, ?> fontDesktopHints = (java.util.Map<?, ?>) toolkit.getDesktopProperty("awt.font.desktophints");
if (fontDesktopHints != null) {
aaHint = fontDesktopHints.get(RenderingHints.KEY_TEXT_ANTIALIASING);
fmHint = fontDesktopHints.get(RenderingHints.KEY_FRACTIONALMETRICS);
@@ -101,7 +100,7 @@ public class Platform {
*/
public static int getMultiClickInterval() {
Toolkit toolkit = Toolkit.getDefaultToolkit();
- Integer multiClickInterval = (Integer)toolkit.getDesktopProperty("awt.multiClickInterval");
+ Integer multiClickInterval = (Integer) toolkit.getDesktopProperty("awt.multiClickInterval");
if (multiClickInterval == null) {
multiClickInterval = DEFAULT_MULTI_CLICK_INTERVAL;
@@ -115,7 +114,7 @@ public class Platform {
*/
public static int getCursorBlinkRate() {
Toolkit toolkit = Toolkit.getDefaultToolkit();
- Integer cursorBlinkRate = (Integer)toolkit.getDesktopProperty("awt.cursorBlinkRate");
+ Integer cursorBlinkRate = (Integer) toolkit.getDesktopProperty("awt.cursorBlinkRate");
if (cursorBlinkRate == null) {
cursorBlinkRate = DEFAULT_CURSOR_BLINK_RATE;
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Point.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Point.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Point.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Point.java Fri Oct 4 23:45:40 2013
@@ -54,13 +54,13 @@ public final class Point implements Seri
}
if (point.containsKey(X_KEY)) {
- x = (Integer)point.get(X_KEY);
+ x = (Integer) point.get(X_KEY);
} else {
x = 0;
}
if (point.containsKey(Y_KEY)) {
- y = (Integer)point.get(Y_KEY);
+ y = (Integer) point.get(Y_KEY);
} else {
y = 0;
}
@@ -75,9 +75,8 @@ public final class Point implements Seri
boolean equals = false;
if (object instanceof Point) {
- Point point = (Point)object;
- equals = (x == point.x
- && y == point.y);
+ Point point = (Point) object;
+ equals = (x == point.x && y == point.y);
}
return equals;
@@ -85,7 +84,7 @@ public final class Point implements Seri
@Override
public int hashCode() {
- return 31 * x + y;
+ return 31 * x + y;
}
@Override
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Prompt.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Prompt.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Prompt.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Prompt.java Fri Oct 4 23:45:40 2013
@@ -118,8 +118,8 @@ public class Prompt extends Sheet {
}
}
- private static class PromptListenerList extends WTKListenerList<PromptListener>
- implements PromptListener {
+ private static class PromptListenerList extends WTKListenerList<PromptListener> implements
+ PromptListener {
@Override
public void messageTypeChanged(Prompt prompt, MessageType previousMessageType) {
for (PromptListener listener : this) {
@@ -178,7 +178,7 @@ public class Prompt extends Sheet {
static {
try {
resources = new Resources(Prompt.class.getName());
- } catch(Exception exception) {
+ } catch (Exception exception) {
throw new RuntimeException(exception);
}
}
@@ -312,8 +312,8 @@ public class Prompt extends Sheet {
prompt(messageType, message, body, owner, null);
}
- public static void prompt(MessageType messageType, String message, Component body, Window owner,
- SheetCloseListener sheetCloseListener) {
+ public static void prompt(MessageType messageType, String message, Component body,
+ Window owner, SheetCloseListener sheetCloseListener) {
Prompt prompt = new Prompt(messageType, message, null, body);
prompt.open(owner, sheetCloseListener);
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/PromptListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/PromptListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/PromptListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/PromptListener.java Fri Oct 4 23:45:40 2013
@@ -59,7 +59,7 @@ public interface PromptListener {
/**
* Called when a prompt's message type has changed.
- *
+ *
* @param prompt
* @param previousMessageType
*/
@@ -67,7 +67,7 @@ public interface PromptListener {
/**
* Called when a prompt's message has changed.
- *
+ *
* @param prompt
* @param previousMessage
*/
@@ -75,7 +75,7 @@ public interface PromptListener {
/**
* Called when a prompt's body has changed.
- *
+ *
* @param prompt
* @param previousBody
*/
@@ -83,7 +83,7 @@ public interface PromptListener {
/**
* Called when an option has been inserted into a prompt's option sequence.
- *
+ *
* @param prompt
* @param index
*/
@@ -91,7 +91,7 @@ public interface PromptListener {
/**
* Called when options have been removed from a prompt's option sequence.
- *
+ *
* @param prompt
* @param index
* @param removed
@@ -100,7 +100,7 @@ public interface PromptListener {
/**
* Called when a prompt's selected option has changed.
- *
+ *
* @param prompt
* @param previousSelectedOption
*/
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java Fri Oct 4 23:45:40 2013
@@ -55,11 +55,9 @@ public class PushButton extends Button {
if (getButtonGroup() == null) {
if (state == State.SELECTED) {
setState(State.UNSELECTED);
- }
- else if (state == State.UNSELECTED) {
+ } else if (state == State.UNSELECTED) {
setState(isTriState() ? State.MIXED : State.SELECTED);
- }
- else {
+ } else {
setState(State.SELECTED);
}
} else {
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButtonGroup.java Fri Oct 4 23:45:40 2013
@@ -31,40 +31,30 @@ import org.apache.pivot.wtk.Keyboard.Mod
/**
* Extension of {@link ButtonGroup} providing keyboard navigation within the
* group and modified focus navigation that treats the group as a single
- * focusable entity.<br/><br/>
- *
- * {@link KeyCode#UP UP} & {@link KeyCode#LEFT LEFT} Select the previous
- * button<br/>
- * {@link KeyCode#DOWN DOWN} & {@link KeyCode#RIGHT RIGHT} Select the next
- * button<br/>
- * {@link KeyCode#HOME HOME} Select the first button<br/>
- * {@link KeyCode#END END} Select the last button<br/><br/>
- *
- * (Note that only {@link Component#isFocusable() focusable} buttons are
- * considered when searching for a Button to select)<br/><br/>
- *
- * When a button within the group is focused and key is typed, an attempt is
- * made to find the next button (default) or previous button (when the SHIFT
- * modifier is pressed) whose renderer text starts with the typed character.
- * This search will always behave as if the <code>circular</code> property were
- * set.<br/><br/>
- *
- * By default, {@link KeyCode#TAB TAB} and {@link KeyCode#TAB SHIFT+TAB}
- * key presses will transfer focus out of the group (forwards or backwards
- * respectively).
- * This is managed by the {@link #setIntraGroupFocusTransferEnabled(boolean)
- * intraGroupFocusTransferEnabled} property.<br/><br/>
- *
- * The {@link #setCircular(boolean) circular} property can be enabled to allow
- * the selection to transfer seamlessly from one end of the group to the other.
+ * focusable entity.<br/><br/> {@link KeyCode#UP UP} & {@link KeyCode#LEFT LEFT}
+ * Select the previous button<br/> {@link KeyCode#DOWN DOWN} &
+ * {@link KeyCode#RIGHT RIGHT} Select the next button<br/> {@link KeyCode#HOME
+ * HOME} Select the first button<br/> {@link KeyCode#END END} Select the last
+ * button<br/><br/> (Note that only {@link Component#isFocusable() focusable}
+ * buttons are considered when searching for a Button to select)<br/><br/> When
+ * a button within the group is focused and key is typed, an attempt is made to
+ * find the next button (default) or previous button (when the SHIFT modifier is
+ * pressed) whose renderer text starts with the typed character. This search
+ * will always behave as if the <code>circular</code> property were
+ * set.<br/><br/> By default, {@link KeyCode#TAB TAB} and {@link KeyCode#TAB
+ * SHIFT+TAB} key presses will transfer focus out of the group (forwards or
+ * backwards respectively). This is managed by the
+ * {@link #setIntraGroupFocusTransferEnabled(boolean)
+ * intraGroupFocusTransferEnabled} property.<br/><br/> The
+ * {@link #setCircular(boolean) circular} property can be enabled to allow the
+ * selection to transfer seamlessly from one end of the group to the other.
* (i.e. holding down an arrow key will cycle through all focusable buttons)
- * <br/><br/>
- *
- * Note that due to the conflicting return types of the <code>add(T)</code> and
- * <code>remove(T)</code> methods in the {@link Group#add(Object) Group} and
- * {@link Sequence#add(Object) Sequence} interfaces, this class cannot actually
- * implement <code>Sequence<Button></code>, although most of the same
- * methods are implemented.<br/>
+ * <br/><br/> Note that due to the conflicting return types of the
+ * <code>add(T)</code> and <code>remove(T)</code> methods in the
+ * {@link Group#add(Object) Group} and {@link Sequence#add(Object) Sequence}
+ * interfaces, this class cannot actually implement
+ * <code>Sequence<Button></code>, although most of the same methods are
+ * implemented.<br/>
*/
public class RadioButtonGroup extends ButtonGroup {
@@ -98,12 +88,11 @@ public class RadioButtonGroup extends Bu
/**
* ComponentKeyListener to be applied to all buttons as they are added to
- * the group.<br/><br/>
- *
- * At least one button in the group must be focused for this listener to be
- * executed, but that won't necessarily be a selected button.<br/>
- * This also means that the group will not be empty, although some of the
- * buttons contained within may not be focusable, or even visible.
+ * the group.<br/><br/> At least one button in the group must be focused for
+ * this listener to be executed, but that won't necessarily be a selected
+ * button.<br/> This also means that the group will not be empty, although
+ * some of the buttons contained within may not be focusable, or even
+ * visible.
*/
private final ComponentKeyListener componentKeyListener = new ComponentKeyListener.Adapter() {
/**
@@ -116,7 +105,7 @@ public class RadioButtonGroup extends Bu
/*
* Potentially transfer focus away from the buttons in this group.
- *
+ *
* At this point we know that at least one button is focused, so we
* just need to find the first or last (and possibly only) focusable
* button depending on the focus transfer direction and then
@@ -209,8 +198,8 @@ public class RadioButtonGroup extends Bu
/**
* Ensure that all buttons in this group have the custom
- * ComponentKeyListener.<br/>
- * This relies on the logic within ButtonGroup to prevent duplicates.
+ * ComponentKeyListener.<br/> This relies on the logic within ButtonGroup to
+ * prevent duplicates.
*/
private final ButtonGroupListener buttonGroupListener = new ButtonGroupListener.Adapter() {
@Override
@@ -253,13 +242,9 @@ public class RadioButtonGroup extends Bu
* {@link RadioButtonGroup#selectPreviousButton(Button) previous} or
* {@link RadioButtonGroup#selectNextButton(Button) next} focusable button
* will not stop when the group's lower or upper bounds (respectively) are
- * reached.<br/>
- *
- * Instead, the search will 'wrap' and continue from the opposite bound
- * until each button in the entire group has been tested for inclusion.
- * <br/><br/>
- *
- * Defaults to <code>false</code>
+ * reached.<br/> Instead, the search will 'wrap' and continue from the
+ * opposite bound until each button in the entire group has been tested for
+ * inclusion. <br/><br/> Defaults to <code>false</code>
*/
public boolean isCircular() {
return circular;
@@ -270,10 +255,9 @@ public class RadioButtonGroup extends Bu
* {@link RadioButtonGroup#selectPreviousButton(Button) previous} or
* {@link RadioButtonGroup#selectNextButton(Button) next} focusable button
* will not stop when the group's lower or upper bounds (respectively) are
- * reached.<br/>
- *
- * Instead, the search will 'wrap' and continue from the opposite bound
- * until each button in the entire group has been tested for inclusion.
+ * reached.<br/> Instead, the search will 'wrap' and continue from the
+ * opposite bound until each button in the entire group has been tested for
+ * inclusion.
*/
public void setCircular(boolean circular) {
this.circular = circular;
@@ -281,8 +265,7 @@ public class RadioButtonGroup extends Bu
/**
* When true, TAB and SHIFT+TAB transfer focus out of the RadioButtonGroup.
- * <br/>
- * Defaults to <code>false</code>
+ * <br/> Defaults to <code>false</code>
*/
public boolean isIntraGroupFocusTransferEnabled() {
return intraGroupFocusTransferEnabled;
@@ -298,7 +281,7 @@ public class RadioButtonGroup extends Bu
/**
* Add a button to the group.
- *
+ *
* @see Group#add(Object)
* @see Sequence#add(Object)
*/
@@ -316,7 +299,7 @@ public class RadioButtonGroup extends Bu
/**
* Return the button at the specified index.
- *
+ *
* @see Sequence#get(int)
*/
public Button get(int index) {
@@ -325,7 +308,7 @@ public class RadioButtonGroup extends Bu
/**
* Return the number of buttons in the group.
- *
+ *
* @see Sequence#getLength()
*/
public int getLength() {
@@ -334,10 +317,9 @@ public class RadioButtonGroup extends Bu
/**
* Return the index (order) of the button within the group.
- *
+ *
* @return The index or -1 if the button does not belong to this
* RadioButtonGroup
- *
* @see Sequence#indexOf(Object)
*/
public int indexOf(Button button) {
@@ -346,7 +328,7 @@ public class RadioButtonGroup extends Bu
/**
* Insert a button at the specified index.
- *
+ *
* @see Sequence#insert(Object, int)
*/
public void insert(Button button, int index) {
@@ -361,7 +343,7 @@ public class RadioButtonGroup extends Bu
/**
* Remove the button from the group.
- *
+ *
* @see Group#remove(Object)
* @see Sequence#remove(Object)
*/
@@ -380,7 +362,7 @@ public class RadioButtonGroup extends Bu
/**
* Remove <code>count</code> buttons from the group starting at
* <code>index</code>.
- *
+ *
* @see Sequence#remove(int, int)
*/
public Sequence<Button> remove(int index, int count) {
@@ -396,7 +378,6 @@ public class RadioButtonGroup extends Bu
return removed;
}
-
/**
* Return an iterator for the <strong>ordered</strong> list of buttons
*/
@@ -407,7 +388,7 @@ public class RadioButtonGroup extends Bu
/**
* Select and <strong>focus</strong> the specified button.
- *
+ *
* @see ButtonGroup#setSelection(Button)
*/
@Override
@@ -445,7 +426,7 @@ public class RadioButtonGroup extends Bu
/**
* Working forwards from the specified button, select the first focusable
* button.
- *
+ *
* @param button If null, the first available button will be selected,
* unless the group contains a selected or focused button, in which case
* that button will be used as the starting point for the search.
@@ -462,7 +443,7 @@ public class RadioButtonGroup extends Bu
// No selection, but perhaps one of the buttons has focus?
Component focusedComponent = Component.getFocusedComponent();
if (focusedComponent instanceof Button) {
- int index = this.indexOf((Button)focusedComponent);
+ int index = this.indexOf((Button) focusedComponent);
if (index != NOT_FOUND_INDEX) {
buttonWithDefault = this.get(index);
}
@@ -490,7 +471,7 @@ public class RadioButtonGroup extends Bu
/**
* Working backwards from the specified button, select the first focusable
* button.
- *
+ *
* @param button If null, the last available button will be selected, unless
* the group contains a selected or focused button, in which case that
* button will be used as the starting point for the search.
@@ -507,7 +488,7 @@ public class RadioButtonGroup extends Bu
// No selection, but perhaps one of the buttons has focus?
Component focusedComponent = Component.getFocusedComponent();
if (focusedComponent instanceof Button) {
- int index = this.indexOf((Button)focusedComponent);
+ int index = this.indexOf((Button) focusedComponent);
if (index != NOT_FOUND_INDEX) {
buttonWithDefault = this.get(index);
}
@@ -537,12 +518,11 @@ public class RadioButtonGroup extends Bu
* Iterate forwards over the buttons in the group, looping back to the start
* if the upper bound is reached and the <code>circular</code> parameter is
* true.
- *
+ *
* @param index Index to which the 'next' is relative
* @param filter Alternative filter to use during the search.
* @param circularArgument Loop when upper bound is reached
* @return The first button found to satisfy the filter
- *
* @see #setCircular(boolean)
*/
private int findNext(int index, final Filter<Integer> filter, boolean circularArgument) {
@@ -578,12 +558,11 @@ public class RadioButtonGroup extends Bu
* Iterate backwards over the buttons in the group, looping back to the end
* if the lower bound is reached and the <code>circular</code> parameter is
* true.
- *
+ *
* @param index Index to which the 'previous' is relative
* @param filter Alternative filter to use during the search.
* @param circularArgument Loop when lower bound is reached
* @return The first focusable button found
- *
* @see #setCircular(boolean)
*/
private int findPrevious(int index, final Filter<Integer> filter, boolean circularArgument) {
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/RangeSelection.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/RangeSelection.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/RangeSelection.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/RangeSelection.java Fri Oct 4 23:45:40 2013
@@ -56,18 +56,16 @@ public class RangeSelection {
/**
* Adds a range to the selection, merging and removing intersecting ranges
* as needed.
- *
+ *
* @param start
* @param end
- *
- * @return
- * A sequence containing the ranges that were added.
+ * @return A sequence containing the ranges that were added.
*/
public Sequence<Span> addRange(int start, int end) {
ArrayList<Span> addedRanges = new ArrayList<>();
Span range = normalize(start, end);
- assert(range.start >= 0);
+ assert (range.start >= 0);
int n = selectedRanges.getLength();
@@ -117,12 +115,13 @@ public class RangeSelection {
selectedRanges.insert(range, i);
addedRanges.add(range);
} else {
- // Create a new range representing the union of the intersecting ranges
+ // Create a new range representing the union of the
+ // intersecting ranges
Span lowerRange = selectedRanges.get(i);
Span upperRange = selectedRanges.get(j - 1);
- range = new Span(Math.min(range.start, lowerRange.start),
- Math.max(range.end, upperRange.end));
+ range = new Span(Math.min(range.start, lowerRange.start), Math.max(range.end,
+ upperRange.end));
// Add the gaps to the added list
if (range.start < lowerRange.start) {
@@ -155,18 +154,16 @@ public class RangeSelection {
/**
* Removes a range from the selection, truncating and removing intersecting
* ranges as needed.
- *
+ *
* @param start
* @param end
- *
- * @return
- * A sequence containing the ranges that were removed.
+ * @return A sequence containing the ranges that were removed.
*/
public Sequence<Span> removeRange(int start, int end) {
ArrayList<Span> removedRanges = new ArrayList<>();
Span range = normalize(start, end);
- assert(range.start >= 0);
+ assert (range.start >= 0);
int n = selectedRanges.getLength();
@@ -180,8 +177,7 @@ public class RangeSelection {
if (i < n) {
Span lowerRange = selectedRanges.get(i);
- if (lowerRange.start < range.start
- && lowerRange.end > range.end) {
+ if (lowerRange.start < range.start && lowerRange.end > range.end) {
// Removing the range will split the intersecting selection
// into two ranges
selectedRanges.update(i, new Span(lowerRange.start, range.start - 1));
@@ -247,7 +243,7 @@ public class RangeSelection {
/**
* Returns the range at a given index.
- *
+ *
* @param index
*/
public Span get(int index) {
@@ -270,12 +266,10 @@ public class RangeSelection {
/**
* Determines the index of a range in the selection.
- *
+ *
* @param range
- *
- * @return
- * The index of the range, if it exists in the selection; <tt>-1</tt>,
- * otherwise.
+ * @return The index of the range, if it exists in the selection;
+ * <tt>-1</tt>, otherwise.
*/
public int indexOf(Span range) {
assert (range != null);
@@ -292,11 +286,9 @@ public class RangeSelection {
/**
* Tests for the presence of an index in the selection.
- *
+ *
* @param index
- *
- * @return
- * <tt>true</tt> if the index is selected; <tt>false</tt>, otherwise.
+ * @return <tt>true</tt> if the index is selected; <tt>false</tt>, otherwise.
*/
public boolean containsIndex(int index) {
Span range = new Span(index);
@@ -308,16 +300,15 @@ public class RangeSelection {
/**
* Inserts an index into the span sequence (e.g. when items are inserted
* into the model data).
- *
+ *
* @param index
- *
- * @return
- * The number of ranges that were updated.
+ * @return The number of ranges that were updated.
*/
public int insertIndex(int index) {
int updated = 0;
- // Get the insertion point for the range corresponding to the given index
+ // Get the insertion point for the range corresponding to the given
+ // index
Span range = new Span(index);
int i = ArrayList.binarySearch(selectedRanges, range, INTERSECTION_COMPARATOR);
@@ -351,14 +342,12 @@ public class RangeSelection {
}
/**
- * Removes a range of indexes from the span sequence (e.g. when items
- * are removed from the model data).
- *
+ * Removes a range of indexes from the span sequence (e.g. when items are
+ * removed from the model data).
+ *
* @param index
* @param count
- *
- * @return
- * The number of ranges that were updated.
+ * @return The number of ranges that were updated.
*/
public int removeIndexes(int index, int count) {
// Clear any selections in the given range
@@ -376,7 +365,8 @@ public class RangeSelection {
int n = selectedRanges.getLength();
while (i < n) {
Span selectedRange = selectedRanges.get(i);
- selectedRanges.update(i, new Span(selectedRange.start - count, selectedRange.end - count));
+ selectedRanges.update(i, new Span(selectedRange.start - count, selectedRange.end
+ - count));
updated++;
i++;
}
@@ -386,12 +376,10 @@ public class RangeSelection {
/**
* Ensures that the start value is less than or equal to the end value.
- *
+ *
* @param start
* @param end
- *
- * @return
- * A span containing the normalized range.
+ * @return A span containing the normalized range.
*/
public static Span normalize(int start, int end) {
return new Span(Math.min(start, end), Math.max(start, end));
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/RemoteManifest.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/RemoteManifest.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/RemoteManifest.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/RemoteManifest.java Fri Oct 4 23:45:40 2013
@@ -31,7 +31,6 @@ import org.apache.pivot.io.FileList;
import org.apache.pivot.wtk.media.Image;
import org.apache.pivot.wtk.media.Picture;
-
/**
* Manifest class that acts as a proxy to remote clipboard or drag/drop data.
*/
@@ -47,7 +46,7 @@ public class RemoteManifest implements M
private static final String FILE_URI_SCHEME = "file";
RemoteManifest(Transferable transferable) {
- assert(transferable != null);
+ assert (transferable != null);
this.transferable = transferable;
DataFlavor[] transferDataFlavors = transferable.getTransferDataFlavors();
@@ -73,7 +72,7 @@ public class RemoteManifest implements M
public String getText() throws IOException {
String text = null;
try {
- text = (String)transferable.getTransferData(textDataFlavor);
+ text = (String) transferable.getTransferData(textDataFlavor);
} catch (UnsupportedFlavorException exception) {
// No-op
}
@@ -90,7 +89,7 @@ public class RemoteManifest implements M
public Image getImage() throws IOException {
Image image = null;
try {
- image = new Picture((BufferedImage)transferable.getTransferData(imageDataFlavor));
+ image = new Picture((BufferedImage) transferable.getTransferData(imageDataFlavor));
} catch (UnsupportedFlavorException exception) {
// No-op
}
@@ -110,12 +109,12 @@ public class RemoteManifest implements M
try {
if (fileListDataFlavor != null) {
- fileList = new FileList((java.util.List<File>)
- transferable.getTransferData(fileListDataFlavor));
+ fileList = new FileList(
+ (java.util.List<File>) transferable.getTransferData(fileListDataFlavor));
} else if (uriListDataFlavor != null) {
fileList = new FileList();
- String uriList = (String)transferable.getTransferData(uriListDataFlavor);
+ String uriList = (String) transferable.getTransferData(uriListDataFlavor);
LineNumberReader reader = new LineNumberReader(new StringReader(uriList));
try {
@@ -124,8 +123,7 @@ public class RemoteManifest implements M
URI uri = new URI(line);
String scheme = uri.getScheme();
- if (scheme != null
- && scheme.equalsIgnoreCase(FILE_URI_SCHEME)) {
+ if (scheme != null && scheme.equalsIgnoreCase(FILE_URI_SCHEME)) {
File file = new File(uri);
fileList.add(file);
}
@@ -145,8 +143,7 @@ public class RemoteManifest implements M
@Override
public boolean containsFileList() {
- return (fileListDataFlavor != null
- || uriListDataFlavor != null);
+ return (fileListDataFlavor != null || uriListDataFlavor != null);
}
@Override
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Renderer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Renderer.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Renderer.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Renderer.java Fri Oct 4 23:45:40 2013
@@ -20,67 +20,50 @@ import org.apache.pivot.collections.Dict
/**
* Base interface for "renderers". Renderers are used to customize the
- * appearance of a component's content.
- *
- * <p>There are several components in Pivot that accept an arbitrary Java
- * object or objects to show as part of their appearance, such as the label
- * of a {@link LinkButton}, the items in a the drop-down menu of a {@link
- * ListButton}, or the cells in a {@link TableView}. By default these
- * components know how to display strings, but you can define a custom
- * renderer to change the default behaviour and/or use non-string data.
- *
+ * appearance of a component's content. <p>There are several components in Pivot
+ * that accept an arbitrary Java object or objects to show as part of their
+ * appearance, such as the label of a {@link LinkButton}, the items in a the
+ * drop-down menu of a {@link ListButton}, or the cells in a {@link TableView}.
+ * By default these components know how to display strings, but you can define a
+ * custom renderer to change the default behaviour and/or use non-string data.
* <p>The exact details of the renderer subinterfaces differ according to the
- * needs of the component, but they all use the the following framework:
- *
- * <ul>
- * <li>A <code>render</code> method, which is called when the component
- * needs to discover the appearance of a data item, and </li>
- * <li>A <code>toString</code> method, which is called when the user wants
- * to navigate via keyboard. (This, of course, may not make sense for data
- * that do not contain an apparent textual component.)</li>
- * </ul>
- *
- * <p>The <code>render</code> method is called during layout and paint
- * operations. It is passed the data object to be rendered, the component
- * performing the rendering, and possibly additional parameters giving
- * context specific to the component, such as whether the object is
- * "selected", or the relative location of a cell inside the component. The
- * renderer's job is to change its internal state using the data object and
- * be prepared to respond to subsequent calls querying the size of the
- * rendering or to paint it. Some components may also call the
- * <code>render</code> method with an object of <code>null</code> when
- * doing layout, if it makes the assumption that all the data elements will
- * be the same size in one or both dimensions, such as the elements of a
- * list.
- *
+ * needs of the component, but they all use the the following framework: <ul>
+ * <li>A <code>render</code> method, which is called when the component needs to
+ * discover the appearance of a data item, and </li> <li>A <code>toString</code>
+ * method, which is called when the user wants to navigate via keyboard. (This,
+ * of course, may not make sense for data that do not contain an apparent
+ * textual component.)</li> </ul> <p>The <code>render</code> method is called
+ * during layout and paint operations. It is passed the data object to be
+ * rendered, the component performing the rendering, and possibly additional
+ * parameters giving context specific to the component, such as whether the
+ * object is "selected", or the relative location of a cell inside the
+ * component. The renderer's job is to change its internal state using the data
+ * object and be prepared to respond to subsequent calls querying the size of
+ * the rendering or to paint it. Some components may also call the
+ * <code>render</code> method with an object of <code>null</code> when doing
+ * layout, if it makes the assumption that all the data elements will be the
+ * same size in one or both dimensions, such as the elements of a list.
* <p>Although not strictly required, the most convenient way to define a
- * renderer is by subclassing a <code>Component</code>, since Components
- * are already able to respond to layout and paint methods. That means all
- * the <code>render</code> method has to do is to modify the Component to
- * include the visually interesting part(s) of the data object in an
- * appropriate place, such as by setting the text of a Label to an
- * identifying string from the object, or setting the image of an ImageView
- * to an icon contained in the object.
- *
- * <p>N.B. If you base a renderer on a Component, you need to call validate on
- * it in order for it to paint correctly, because your renderer doesn't
- * have a parent to take care of that for you. Since all components that
- * call renderers call <code>setSize</code> before calling
- * <code>paint</code>, the canonical way to handle this is by including the
- * following override in your renderer:
- * <pre> @Override
- * public void setSize(int width, int height) {
- * super.setSize(width, height);
- * validate();
- * }</pre>
- * <p>Note that you don't always need the additional parameters to
- * <code>render</code> if your renderer is simple enough. For example,
- * {@link ListView} passes parameters that tell whether the item is
- * selected or highlighted, but it also sets the background of the area
- * occupied by the renderer according to those parameters. Thus, if your
- * render has a transparent background, the selection state will be
- * apparent. Of course, you may want to adjust font or border colors within
- * the renderer to be harmonious with that different background.
+ * renderer is by subclassing a <code>Component</code>, since Components are
+ * already able to respond to layout and paint methods. That means all the
+ * <code>render</code> method has to do is to modify the Component to include
+ * the visually interesting part(s) of the data object in an appropriate place,
+ * such as by setting the text of a Label to an identifying string from the
+ * object, or setting the image of an ImageView to an icon contained in the
+ * object. <p>N.B. If you base a renderer on a Component, you need to call
+ * validate on it in order for it to paint correctly, because your renderer
+ * doesn't have a parent to take care of that for you. Since all components that
+ * call renderers call <code>setSize</code> before calling <code>paint</code>,
+ * the canonical way to handle this is by including the following override in
+ * your renderer: <pre> @Override public void setSize(int width, int height) {
+ * super.setSize(width, height); validate(); }</pre> <p>Note that you don't
+ * always need the additional parameters to <code>render</code> if your renderer
+ * is simple enough. For example, {@link ListView} passes parameters that tell
+ * whether the item is selected or highlighted, but it also sets the background
+ * of the area occupied by the renderer according to those parameters. Thus, if
+ * your render has a transparent background, the selection state will be
+ * apparent. Of course, you may want to adjust font or border colors within the
+ * renderer to be harmonious with that different background.
*/
public interface Renderer extends ConstrainedVisual {
/**
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Rollup.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Rollup.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Rollup.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Rollup.java Fri Oct 4 23:45:40 2013
@@ -29,8 +29,8 @@ import org.apache.pivot.util.Vote;
*/
@DefaultProperty("content")
public class Rollup extends Container {
- private static class RollupListenerList extends WTKListenerList<RollupListener>
- implements RollupListener {
+ private static class RollupListenerList extends WTKListenerList<RollupListener> implements
+ RollupListener {
@Override
public void headingChanged(Rollup rollup, Component previousHeading) {
for (RollupListener listener : this) {
@@ -117,7 +117,7 @@ public class Rollup extends Container {
}
public void setHeading(Component heading) {
- Component previousHeading = this.heading;
+ Component previousHeading = this.heading;
if (heading != previousHeading) {
// Remove any previous heading component
@@ -143,7 +143,7 @@ public class Rollup extends Container {
}
public void setContent(Component content) {
- Component previousContent = this.content;
+ Component previousContent = this.content;
if (content != previousContent) {
// Remove any previous content component
@@ -196,8 +196,7 @@ public class Rollup extends Container {
public Sequence<Component> remove(int index, int count) {
for (int i = index, n = index + count; i < n; i++) {
Component component = get(i);
- if (component == heading
- || component == content) {
+ if (component == heading || component == content) {
throw new UnsupportedOperationException();
}
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/RollupListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/RollupListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/RollupListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/RollupListener.java Fri Oct 4 23:45:40 2013
@@ -17,9 +17,9 @@
package org.apache.pivot.wtk;
/**
- * Defines event listener methods that pertain to rollups. Developers
- * register for such events by adding themselves to a rollup's list of "rollup
- * listeners" (see {@link Rollup#getRollupListeners()}).
+ * Defines event listener methods that pertain to rollups. Developers register
+ * for such events by adding themselves to a rollup's list of "rollup listeners"
+ * (see {@link Rollup#getRollupListeners()}).
*/
public interface RollupListener {
/**
@@ -44,7 +44,7 @@ public interface RollupListener {
/**
* Called when a rollup's heading component changed.
- *
+ *
* @param rollup
* @param previousHeading
*/
@@ -52,7 +52,7 @@ public interface RollupListener {
/**
* Called when a rollup's content component changed.
- *
+ *
* @param rollup
* @param previousContent
*/
@@ -60,7 +60,7 @@ public interface RollupListener {
/**
* Called when a rollup's collapsible flag has changed.
- *
+ *
* @param rollup
*/
public void collapsibleChanged(Rollup rollup);
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/RollupStateListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/RollupStateListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/RollupStateListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/RollupStateListener.java Fri Oct 4 23:45:40 2013
@@ -46,14 +46,14 @@ public interface RollupStateListener {
/**
* Called to preview a rollup expansion event.
- *
+ *
* @param rollup
*/
public Vote previewExpandedChange(Rollup rollup);
/**
* Called when a rollup expansion event has been vetoed.
- *
+ *
* @param rollup
* @param reason
*/
@@ -61,7 +61,7 @@ public interface RollupStateListener {
/**
* Called when a rollup's expanded state changed.
- *
+ *
* @param rollup
*/
public void expandedChanged(Rollup rollup);
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java Fri Oct 4 23:45:40 2013
@@ -67,7 +67,7 @@ public class ScriptApplication implement
// Load the file and open the window
BXMLSerializer bxmlSerializer = new BXMLSerializer();
- this.window = (Window)bxmlSerializer.readObject(location, resources);
+ this.window = (Window) bxmlSerializer.readObject(location, resources);
this.window.open(display);
}
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBar.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBar.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBar.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBar.java Fri Oct 4 23:45:40 2013
@@ -61,9 +61,9 @@ public class ScrollBar extends Container
throw new IllegalArgumentException(EXTENT_KEY + " is required.");
}
- start = (Integer)scope.get(START_KEY);
- end = (Integer)scope.get(END_KEY);
- extent = (Integer)scope.get(EXTENT_KEY);
+ start = (Integer) scope.get(START_KEY);
+ end = (Integer) scope.get(END_KEY);
+ extent = (Integer) scope.get(EXTENT_KEY);
}
@Override
@@ -87,11 +87,10 @@ public class ScrollBar extends Container
}
}
- private static class ScrollBarListenerList extends WTKListenerList<ScrollBarListener>
- implements ScrollBarListener {
+ private static class ScrollBarListenerList extends WTKListenerList<ScrollBarListener> implements
+ ScrollBarListener {
@Override
- public void orientationChanged(ScrollBar scrollBar,
- Orientation previousOrientation) {
+ public void orientationChanged(ScrollBar scrollBar, Orientation previousOrientation) {
for (ScrollBarListener listener : this) {
listener.orientationChanged(scrollBar, previousOrientation);
}
@@ -101,8 +100,7 @@ public class ScrollBar extends Container
public void scopeChanged(ScrollBar scrollBar, int previousStart, int previousEnd,
int previousExtent) {
for (ScrollBarListener listener : this) {
- listener.scopeChanged(scrollBar, previousStart, previousEnd,
- previousExtent);
+ listener.scopeChanged(scrollBar, previousStart, previousEnd, previousExtent);
}
}
@@ -114,8 +112,7 @@ public class ScrollBar extends Container
}
@Override
- public void blockIncrementChanged(ScrollBar scrollBar,
- int previousBlockIncrement) {
+ public void blockIncrementChanged(ScrollBar scrollBar, int previousBlockIncrement) {
for (ScrollBarListener listener : this) {
listener.blockIncrementChanged(scrollBar, previousBlockIncrement);
}
@@ -141,8 +138,7 @@ public class ScrollBar extends Container
private int blockIncrement = 1;
private ScrollBarListenerList scrollBarListeners = new ScrollBarListenerList();
- private ScrollBarValueListenerList scrollBarValueListeners =
- new ScrollBarValueListenerList();
+ private ScrollBarValueListenerList scrollBarValueListeners = new ScrollBarValueListenerList();
public ScrollBar() {
this(Orientation.HORIZONTAL);
@@ -240,30 +236,26 @@ public class ScrollBar extends Container
int previousEnd = this.end;
int previousExtent = this.extent;
- if (start != previousStart
- || end != previousEnd
- || extent != previousExtent) {
+ if (start != previousStart || end != previousEnd || extent != previousExtent) {
if (start > value) {
- throw new IllegalArgumentException(String.format
- ("start (%d) is greater than value (%d)", start, value));
+ throw new IllegalArgumentException(String.format(
+ "start (%d) is greater than value (%d)", start, value));
}
if (extent < 0) {
- throw new IllegalArgumentException(String.format
- ("extent (%d) is negative", extent));
+ throw new IllegalArgumentException(String.format("extent (%d) is negative", extent));
}
if (end < value + extent) {
- throw new IllegalArgumentException(String.format
- ("end (%d) is less than value (%d) + extent (%d)", end, value, extent));
+ throw new IllegalArgumentException(String.format(
+ "end (%d) is less than value (%d) + extent (%d)", end, value, extent));
}
this.start = start;
this.end = end;
this.extent = extent;
- scrollBarListeners.scopeChanged(this, previousStart, previousEnd,
- previousExtent);
+ scrollBarListeners.scopeChanged(this, previousStart, previousEnd, previousExtent);
}
}
@@ -300,13 +292,13 @@ public class ScrollBar extends Container
if (value != previousValue) {
if (value < start) {
- throw new IllegalArgumentException(String.format
- ("value (%d) is less than start (%d)", value, start));
+ throw new IllegalArgumentException(String.format(
+ "value (%d) is less than start (%d)", value, start));
}
if (value + extent > end) {
- throw new IllegalArgumentException(String.format
- ("value (%d) + extent (%d) is greater than end (%d)", value, extent, end));
+ throw new IllegalArgumentException(String.format(
+ "value (%d) + extent (%d) is greater than end (%d)", value, extent, end));
}
this.value = value;
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBarListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBarListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBarListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBarListener.java Fri Oct 4 23:45:40 2013
@@ -48,7 +48,7 @@ public interface ScrollBarListener {
/**
* Called when a scroll bar's orientation has changed.
- *
+ *
* @param scrollBar
* @param previousOrientation
*/
@@ -56,7 +56,7 @@ public interface ScrollBarListener {
/**
* Called when a scroll bar's scope has changed.
- *
+ *
* @param scrollBar
* @param previousStart
* @param previousEnd
@@ -67,7 +67,7 @@ public interface ScrollBarListener {
/**
* Called when a scroll bar's unit increment has changed.
- *
+ *
* @param scrollBar
* @param previousUnitIncrement
*/
@@ -75,7 +75,7 @@ public interface ScrollBarListener {
/**
* Called when a scroll bar's block increment has changed.
- *
+ *
* @param scrollBar
* @param previousBlockIncrement
*/
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBarValueListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBarValueListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBarValueListener.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ScrollBarValueListener.java Fri Oct 4 23:45:40 2013
@@ -22,7 +22,7 @@ package org.apache.pivot.wtk;
public interface ScrollBarValueListener {
/**
* Called when a scroll bar's value has changed.
- *
+ *
* @param scrollBar
* @param previousValue
*/