diff --git a/.gitattributes b/.gitattributes index 40b78fc585a..1afd5f58abf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11191,8 +11191,6 @@ src/main/java/net/slightlymagic/maxmtg/Closure1.java -text src/main/java/net/slightlymagic/maxmtg/Predicate.java -text src/main/java/net/slightlymagic/maxmtg/PredicateString.java -text src/main/java/net/slightlymagic/maxmtg/package-info.java svneol=native#text/plain -src/main/java/org/eclipse/wb/swing/FocusTraversalOnArray.java -text -src/main/java/org/eclipse/wb/swing/package-info.java svneol=native#text/plain src/main/java/tree/properties/PropertyElement.java svneol=native#text/plain src/main/java/tree/properties/PropertyType.java svneol=native#text/plain src/main/java/tree/properties/TreeProperties.java svneol=native#text/plain diff --git a/src/main/java/org/eclipse/wb/swing/FocusTraversalOnArray.java b/src/main/java/org/eclipse/wb/swing/FocusTraversalOnArray.java deleted file mode 100644 index f8679aeee3a..00000000000 --- a/src/main/java/org/eclipse/wb/swing/FocusTraversalOnArray.java +++ /dev/null @@ -1,127 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Google, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Google, Inc. - initial API and implementation - *******************************************************************************/ -package org.eclipse.wb.swing; - -import java.awt.Component; -import java.awt.Container; -import java.awt.FocusTraversalPolicy; - -/** - * Cyclic focus traversal policy based on array of components. - *
- * This class may be freely distributed as part of any application or plugin. - * - * @author scheglov_ke - */ -public class FocusTraversalOnArray extends FocusTraversalPolicy { - private final Component[] mComponents; - - // ////////////////////////////////////////////////////////////////////////// - // - // Constructor - // - // ////////////////////////////////////////////////////////////////////////// - /** - * - * FocusTraversalOnArray. - * @param components a Component - */ - public FocusTraversalOnArray(final Component[] components) { - mComponents = components; - } - - // ////////////////////////////////////////////////////////////////////////// - // - // Utilities - // - // ////////////////////////////////////////////////////////////////////////// - private int indexCycle(final int index, final int delta) { - int size = mComponents.length; - int next = (index + delta + size) % size; - return next; - } - - private Component cycle(final Component currentComponent, final int delta) { - int index = -1; - loop: for (int i = 0; i < mComponents.length; i++) { - Component component = mComponents[i]; - for (Component c = currentComponent; c != null; c = c.getParent()) { - if (component == c) { - index = i; - break loop; - } - } - } - // try to find enabled component in "delta" direction - int initialIndex = index; - while (true) { - int newIndex = indexCycle(index, delta); - if (newIndex == initialIndex) { - break; - } - index = newIndex; - // - Component component = mComponents[newIndex]; - if (component.isEnabled() && component.isVisible() && component.isFocusable()) { - return component; - } - } - // not found - return currentComponent; - } - - // ////////////////////////////////////////////////////////////////////////// - // - // FocusTraversalPolicy - // - // ////////////////////////////////////////////////////////////////////////// - /** - * @param container a Container - * @param component a Component - * @return Component - */ - public final Component getComponentAfter(final Container container, final Component component) { - return cycle(component, 1); - } - - /** - * @param container a Container - * @param component a Component - * @return Component - */ - public final Component getComponentBefore(final Container container, final Component component) { - return cycle(component, -1); - } - - /** - * @param container a Container - * @return Component - */ - public final Component getFirstComponent(final Container container) { - return mComponents[0]; - } - - /** - * @param container a Container - * @return Component - */ - public final Component getLastComponent(final Container container) { - return mComponents[mComponents.length - 1]; - } - - /** - * @param container a Container - * @return Component - */ - public final Component getDefaultComponent(final Container container) { - return getFirstComponent(container); - } -} diff --git a/src/main/java/org/eclipse/wb/swing/package-info.java b/src/main/java/org/eclipse/wb/swing/package-info.java deleted file mode 100644 index 7ea1d25efb5..00000000000 --- a/src/main/java/org/eclipse/wb/swing/package-info.java +++ /dev/null @@ -1,2 +0,0 @@ -/** Forge Card Game. */ -package org.eclipse.wb.swing;