Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2015-02-05 10:21:07 +0000
committerMarkus Tiede2015-02-05 10:21:07 +0000
commit7e725f7ef26ea089d9cbf7bd95bbd1fd64f38068 (patch)
tree7a3135f46cadea11d2ceaf04ca7c003ce78a0be3 /org.eclipse.jubula.rc.swing/src
parent3fa21106b7e6a8274189297364eadfe87633cff3 (diff)
downloadorg.eclipse.jubula.core-7e725f7ef26ea089d9cbf7bd95bbd1fd64f38068.tar.gz
org.eclipse.jubula.core-7e725f7ef26ea089d9cbf7bd95bbd1fd64f38068.tar.xz
org.eclipse.jubula.core-7e725f7ef26ea089d9cbf7bd95bbd1fd64f38068.zip
Non-sprint task - avoid unnecessary hiding of method.
Diffstat (limited to 'org.eclipse.jubula.rc.swing/src')
-rw-r--r--org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java44
-rw-r--r--org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/FindSwingComponentBP.java26
2 files changed, 25 insertions, 45 deletions
diff --git a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java
index 6c27b11a7..e5b0e8f7e 100644
--- a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java
+++ b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java
@@ -884,7 +884,7 @@ public class AUTSwingHierarchy extends AUTHierarchy<Component>
}
/**
- * A window listener listening to window closed, registerd to any opened window. <br>
+ * A window listener listening to window closed, registered to any opened window. <br>
* @author BREDEX GmbH
* @created 05.10.2004
*
@@ -967,16 +967,17 @@ public class AUTSwingHierarchy extends AUTHierarchy<Component>
}
}
- /**
- * {@inheritDoc}
- */
- public void componentHidden(ComponentEvent e) {
- checkDispatchThread();
- if (e.getComponent() instanceof Window) {
- remove((Window)e.getComponent());
- } else {
- removeComponent(e.getComponent(), e.getComponent().getParent());
- }
+ /**
+ * {@inheritDoc}
+ */
+ public void componentHidden(ComponentEvent e) {
+ checkDispatchThread();
+ Component component = e.getComponent();
+ if (component instanceof Window) {
+ remove((Window) component);
+ } else {
+ removeComponent(component, component.getParent());
+ }
}
/**
@@ -993,16 +994,17 @@ public class AUTSwingHierarchy extends AUTHierarchy<Component>
// Do nothing
}
- /**
- * {@inheritDoc}
- */
- public void componentShown(ComponentEvent e) {
- checkDispatchThread();
- if (e.getComponent() instanceof Window) {
- add((Window)e.getComponent());
- } else {
- addComponent(e.getComponent());
- }
+ /**
+ * {@inheritDoc}
+ */
+ public void componentShown(ComponentEvent e) {
+ checkDispatchThread();
+ Component component = e.getComponent();
+ if (component instanceof Window) {
+ add((Window) component);
+ } else {
+ addComponent(component);
+ }
}
/**
diff --git a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/FindSwingComponentBP.java b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/FindSwingComponentBP.java
index 4a327096e..92a7259e9 100644
--- a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/FindSwingComponentBP.java
+++ b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/FindSwingComponentBP.java
@@ -13,7 +13,6 @@ package org.eclipse.jubula.rc.swing.components;
import java.awt.Component;
import org.eclipse.jubula.rc.common.components.FindComponentBP;
-import org.eclipse.jubula.tools.internal.objects.IComponentIdentifier;
/**
@@ -21,33 +20,12 @@ import org.eclipse.jubula.tools.internal.objects.IComponentIdentifier;
* @created Nov 10, 2005
*/
public class FindSwingComponentBP extends FindComponentBP {
-
- /**
- * Searchs for the component in the AUT with the given
- * <code>componentIdentifier</code>.
- *
- * @param componentIdentifier the identifier created in object mapping mode
- * @param autHierarchy the current aut hierarchy
- * @throws IllegalArgumentException if the given identifer is null or <br>
- * the hierarchy is not valid: empty or containing null elements
- * @return the instance of the component of the AUT
- */
- protected Object findComponent(
- IComponentIdentifier componentIdentifier,
- AUTSwingHierarchy autHierarchy) throws IllegalArgumentException {
- return super.findComponent(componentIdentifier, autHierarchy);
- }
-
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
protected String getCompName(Object currentComponent) {
return ((Component)currentComponent).getName();
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
protected boolean isAvailable(Object currComp) {
Component comp = (Component)currComp;
return comp.isShowing();

Back to the top