summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/ui/AbstractComponent.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/itmill/toolkit/ui/AbstractComponent.java')
-rw-r--r--src/com/itmill/toolkit/ui/AbstractComponent.java46
1 files changed, 11 insertions, 35 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractComponent.java b/src/com/itmill/toolkit/ui/AbstractComponent.java
index 08d447640f..d62939add7 100644
--- a/src/com/itmill/toolkit/ui/AbstractComponent.java
+++ b/src/com/itmill/toolkit/ui/AbstractComponent.java
@@ -1,30 +1,6 @@
-/* *************************************************************************
-
- IT Mill Toolkit
-
- Development of Browser User Interfaces Made Easy
-
- Copyright (C) 2000-2006 IT Mill Ltd
-
- *************************************************************************
-
- This product is distributed under commercial license that can be found
- from the product package on license.pdf. Use of this product might
- require purchasing a commercial license from IT Mill Ltd. For guidelines
- on usage, see licensing-guidelines.html
-
- *************************************************************************
-
- For more information, contact:
-
- IT Mill Ltd phone: +358 2 4802 7180
- Ruukinkatu 2-4 fax: +358 2 4802 7181
- 20540, Turku email: info@itmill.com
- Finland company www: www.itmill.com
-
- Primary source for information and releases: www.itmill.com
-
- ********************************************************************** */
+/*
+@ITMillApache2LicenseForJavaFiles@
+ */
package com.itmill.toolkit.ui;
@@ -188,7 +164,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
public String getStyleName() {
String s = "";
if (styles != null) {
- for (Iterator it = styles.iterator(); it.hasNext();) {
+ for (final Iterator it = styles.iterator(); it.hasNext();) {
s += (String) it.next();
if (it.hasNext()) {
s += " ";
@@ -266,7 +242,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
if (parent != null) {
return parent.getLocale();
}
- Application app = getApplication();
+ final Application app = getApplication();
if (app != null) {
return app.getLocale();
}
@@ -614,14 +590,14 @@ public abstract class AbstractComponent implements Component, MethodEventSource
// Only paint content of visible components.
if (isVisible()) {
- String desc = getDescription();
+ final String desc = getDescription();
if (desc != null && description.length() > 0) {
target.addAttribute("description", getDescription());
}
paintContent(target);
- ErrorMessage error = getErrorMessage();
+ final ErrorMessage error = getErrorMessage();
if (error != null) {
error.paint(target);
}
@@ -684,8 +660,8 @@ public abstract class AbstractComponent implements Component, MethodEventSource
// Notify the listeners
if (repaintRequestListeners != null
&& !repaintRequestListeners.isEmpty()) {
- Object[] listeners = repaintRequestListeners.toArray();
- RepaintRequestEvent event = new RepaintRequestEvent(this);
+ final Object[] listeners = repaintRequestListeners.toArray();
+ final RepaintRequestEvent event = new RepaintRequestEvent(this);
for (int i = 0; i < listeners.length; i++) {
if (alreadyNotified == null) {
alreadyNotified = new LinkedList();
@@ -700,7 +676,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
}
// Notify the parent
- Component parent = getParent();
+ final Component parent = getParent();
if (parent != null) {
parent.childRequestedRepaint(alreadyNotified);
}
@@ -758,7 +734,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
COMPONENT_EVENT_METHOD = Component.Listener.class
.getDeclaredMethod("componentEvent",
new Class[] { Component.Event.class });
- } catch (java.lang.NoSuchMethodException e) {
+ } catch (final java.lang.NoSuchMethodException e) {
// This should never happen
e.printStackTrace();
throw new java.lang.RuntimeException();