Conflicts: src/com/vaadin/terminal/gwt/client/ui/draganddropwrapper/VDragAndDropWrapper.java src/com/vaadin/terminal/gwt/client/ui/form/VForm.java src/com/vaadin/terminal/gwt/client/ui/window/VWindow.java tests/server-side/com/vaadin/tests/VaadinClasses.java Removed Java5-incompatible @Override annotationstags/7.0.0.alpha3
@@ -235,10 +235,11 @@ div.v-app-loading { | |||
.v-drag-element { | |||
z-index: 60000; | |||
position: absolute; | |||
opacity: 0.5; | |||
filter: alpha(opacity=50); | |||
cursor: default; | |||
/* override any other position: properties */ | |||
position: absolute !important; | |||
opacity: 0.5; | |||
filter: alpha(opacity=50); | |||
cursor: default; | |||
} | |||
.v-clip { |
@@ -194,6 +194,7 @@ public class Application implements Terminal.ErrorListener, Serializable { | |||
* @see #getWindow(String) | |||
* @see Application#getRoot(WrappedRequest) | |||
*/ | |||
@Override | |||
public Root.LegacyWindow getRoot(WrappedRequest request) { | |||
String pathInfo = request.getRequestPathInfo(); | |||
@@ -246,6 +247,7 @@ public class Application implements Terminal.ErrorListener, Serializable { | |||
* <p> | |||
* {@inheritDoc} | |||
*/ | |||
@Override | |||
public String getThemeForRoot(Root root) { | |||
return theme; | |||
@@ -1066,7 +1068,7 @@ public class Application implements Terminal.ErrorListener, Serializable { | |||
* the change event. | |||
* @see com.vaadin.terminal.Terminal.ErrorListener#terminalError(com.vaadin.terminal.Terminal.ErrorEvent) | |||
*/ | |||
@Override | |||
public void terminalError(Terminal.ErrorEvent event) { | |||
final Throwable t = event.getThrowable(); | |||
if (t instanceof SocketException) { | |||
@@ -1811,7 +1813,6 @@ public class Application implements Terminal.ErrorListener, Serializable { | |||
this.throwable = throwable; | |||
} | |||
@Override | |||
public Throwable getThrowable() { | |||
return throwable; | |||
} |
@@ -112,17 +112,14 @@ public class MethodPropertyDescriptor<BT> implements | |||
} | |||
}; | |||
@Override | |||
public String getName() { | |||
return name; | |||
} | |||
@Override | |||
public Class<?> getPropertyType() { | |||
return propertyType; | |||
} | |||
@Override | |||
public Property<?> createProperty(Object bean) { | |||
return new MethodProperty<Object>(propertyType, bean, readMethod, | |||
writeMethod); |
@@ -129,7 +129,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* {@inheritDoc} | |||
*/ | |||
@Override | |||
public Object addItem() throws UnsupportedOperationException { | |||
Object emptyKey[] = new Object[delegate.getPrimaryKeyColumns().size()]; | |||
RowId itemId = new TemporaryRowId(emptyKey); | |||
@@ -185,7 +185,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#containsId(java.lang.Object) | |||
*/ | |||
@Override | |||
public boolean containsId(Object itemId) { | |||
if (itemId == null) { | |||
return false; | |||
@@ -226,7 +226,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* @see com.vaadin.data.Container#getContainerProperty(java.lang.Object, | |||
* java.lang.Object) | |||
*/ | |||
@Override | |||
public Property<?> getContainerProperty(Object itemId, Object propertyId) { | |||
Item item = getItem(itemId); | |||
if (item == null) { | |||
@@ -240,7 +240,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#getContainerPropertyIds() | |||
*/ | |||
@Override | |||
public Collection<?> getContainerPropertyIds() { | |||
return Collections.unmodifiableCollection(propertyIds); | |||
} | |||
@@ -250,7 +250,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#getItem(java.lang.Object) | |||
*/ | |||
@Override | |||
public Item getItem(Object itemId) { | |||
if (!cachedItems.containsKey(itemId)) { | |||
int index = indexOfId(itemId); | |||
@@ -297,7 +297,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* {@inheritDoc} | |||
*/ | |||
@Override | |||
public Collection<?> getItemIds() { | |||
updateCount(); | |||
ArrayList<RowId> ids = new ArrayList<RowId>(); | |||
@@ -354,7 +354,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#getType(java.lang.Object) | |||
*/ | |||
@Override | |||
public Class<?> getType(Object propertyId) { | |||
if (!propertyIds.contains(propertyId)) { | |||
return null; | |||
@@ -367,7 +367,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#size() | |||
*/ | |||
@Override | |||
public int size() { | |||
updateCount(); | |||
return size + sizeOfAddedItems() - removedItems.size(); | |||
@@ -378,7 +378,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#removeItem(java.lang.Object) | |||
*/ | |||
@Override | |||
public boolean removeItem(Object itemId) | |||
throws UnsupportedOperationException { | |||
if (!containsId(itemId)) { | |||
@@ -446,7 +446,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#removeAllItems() | |||
*/ | |||
@Override | |||
public boolean removeAllItems() throws UnsupportedOperationException { | |||
if (autoCommit) { | |||
/* Remove and commit instantly. */ | |||
@@ -507,7 +507,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
/** | |||
* {@inheritDoc} | |||
*/ | |||
@Override | |||
public void addContainerFilter(Filter filter) | |||
throws UnsupportedFilterException { | |||
// filter.setCaseSensitive(!ignoreCase); | |||
@@ -519,7 +519,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
/** | |||
* {@inheritDoc} | |||
*/ | |||
@Override | |||
public void removeContainerFilter(Filter filter) { | |||
filters.remove(filter); | |||
} | |||
@@ -559,7 +559,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
/** | |||
* {@inheritDoc} | |||
*/ | |||
@Override | |||
public void removeAllContainerFilters() { | |||
filters.clear(); | |||
refresh(); | |||
@@ -574,7 +574,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Indexed#indexOfId(java.lang.Object) | |||
*/ | |||
@Override | |||
public int indexOfId(Object itemId) { | |||
// First check if the id is in the added items | |||
for (int ix = 0; ix < addedItems.size(); ix++) { | |||
@@ -621,7 +621,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Indexed#getIdByIndex(int) | |||
*/ | |||
@Override | |||
public Object getIdByIndex(int index) { | |||
if (index < 0 || index > size() - 1) { | |||
return null; | |||
@@ -648,7 +648,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#nextItemId(java.lang.Object) | |||
*/ | |||
@Override | |||
public Object nextItemId(Object itemId) { | |||
return getIdByIndex(indexOfId(itemId) + 1); | |||
} | |||
@@ -658,7 +658,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#prevItemId(java.lang.Object) | |||
*/ | |||
@Override | |||
public Object prevItemId(Object itemId) { | |||
return getIdByIndex(indexOfId(itemId) - 1); | |||
} | |||
@@ -668,7 +668,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#firstItemId() | |||
*/ | |||
@Override | |||
public Object firstItemId() { | |||
updateCount(); | |||
if (size == 0) { | |||
@@ -696,7 +696,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#lastItemId() | |||
*/ | |||
@Override | |||
public Object lastItemId() { | |||
if (addedItems.isEmpty()) { | |||
int lastIx = size() - 1; | |||
@@ -722,7 +722,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#isFirstId(java.lang.Object) | |||
*/ | |||
@Override | |||
public boolean isFirstId(Object itemId) { | |||
return firstItemId().equals(itemId); | |||
} | |||
@@ -732,7 +732,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#isLastId(java.lang.Object) | |||
*/ | |||
@Override | |||
public boolean isLastId(Object itemId) { | |||
return lastItemId().equals(itemId); | |||
} | |||
@@ -747,7 +747,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* @see com.vaadin.data.Container.Sortable#sort(java.lang.Object[], | |||
* boolean[]) | |||
*/ | |||
@Override | |||
public void sort(Object[] propertyId, boolean[] ascending) { | |||
sorters.clear(); | |||
if (propertyId == null || propertyId.length == 0) { | |||
@@ -776,7 +776,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds() | |||
*/ | |||
@Override | |||
public Collection<?> getSortableContainerPropertyIds() { | |||
return getContainerPropertyIds(); | |||
} | |||
@@ -1350,7 +1350,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* @see com.vaadin.data.Container#addContainerProperty(java.lang.Object, | |||
* java.lang.Class, java.lang.Object) | |||
*/ | |||
@Override | |||
public boolean addContainerProperty(Object propertyId, Class<?> type, | |||
Object defaultValue) throws UnsupportedOperationException { | |||
throw new UnsupportedOperationException(); | |||
@@ -1361,7 +1361,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object) | |||
*/ | |||
@Override | |||
public boolean removeContainerProperty(Object propertyId) | |||
throws UnsupportedOperationException { | |||
throw new UnsupportedOperationException(); | |||
@@ -1372,7 +1372,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container#addItem(java.lang.Object) | |||
*/ | |||
@Override | |||
public Item addItem(Object itemId) throws UnsupportedOperationException { | |||
throw new UnsupportedOperationException(); | |||
} | |||
@@ -1383,7 +1383,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object, | |||
* java.lang.Object) | |||
*/ | |||
@Override | |||
public Item addItemAfter(Object previousItemId, Object newItemId) | |||
throws UnsupportedOperationException { | |||
throw new UnsupportedOperationException(); | |||
@@ -1394,7 +1394,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Indexed#addItemAt(int, java.lang.Object) | |||
*/ | |||
@Override | |||
public Item addItemAt(int index, Object newItemId) | |||
throws UnsupportedOperationException { | |||
throw new UnsupportedOperationException(); | |||
@@ -1405,7 +1405,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Indexed#addItemAt(int) | |||
*/ | |||
@Override | |||
public Object addItemAt(int index) throws UnsupportedOperationException { | |||
throw new UnsupportedOperationException(); | |||
} | |||
@@ -1415,7 +1415,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object) | |||
*/ | |||
@Override | |||
public Object addItemAfter(Object previousItemId) | |||
throws UnsupportedOperationException { | |||
throw new UnsupportedOperationException(); | |||
@@ -1432,7 +1432,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* com.vaadin.data.Container.ItemSetChangeNotifier#addListener(com.vaadin | |||
* .data.Container.ItemSetChangeListener) | |||
*/ | |||
@Override | |||
public void addListener(Container.ItemSetChangeListener listener) { | |||
if (itemSetChangeListeners == null) { | |||
itemSetChangeListeners = new LinkedList<Container.ItemSetChangeListener>(); | |||
@@ -1447,7 +1447,7 @@ public class SQLContainer implements Container, Container.Filterable, | |||
* com.vaadin.data.Container.ItemSetChangeNotifier#removeListener(com.vaadin | |||
* .data.Container.ItemSetChangeListener) | |||
*/ | |||
@Override | |||
public void removeListener(Container.ItemSetChangeListener listener) { | |||
if (itemSetChangeListeners != null) { | |||
itemSetChangeListeners.remove(listener); | |||
@@ -1477,7 +1477,6 @@ public class SQLContainer implements Container, Container.Filterable, | |||
super(source); | |||
} | |||
@Override | |||
public Container getContainer() { | |||
return (Container) getSource(); | |||
} |
@@ -347,7 +347,7 @@ public class ApplicationConfiguration implements EntryPoint { | |||
*/ | |||
public static void startApplication(final String applicationId) { | |||
Scheduler.get().scheduleDeferred(new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
ApplicationConfiguration appConf = getConfigFromDOM(applicationId); | |||
ApplicationConnection a = GWT | |||
@@ -553,7 +553,6 @@ public class ApplicationConfiguration implements EntryPoint { | |||
private static DeferredWidgetLoader deferredWidgetLoader; | |||
@Override | |||
public void onModuleLoad() { | |||
// Prepare VConsole for debugging | |||
@@ -571,7 +570,7 @@ public class ApplicationConfiguration implements EntryPoint { | |||
* GWT hosted mode. | |||
*/ | |||
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { | |||
@Override | |||
public void onUncaughtException(Throwable e) { | |||
/* | |||
* Note in case of null console (without ?debug) we eat |
@@ -52,7 +52,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler, | |||
* hits. | |||
*/ | |||
private final NativePreviewHandler mouseUpPreviewHandler = new NativePreviewHandler() { | |||
@Override | |||
public void onPreviewNativeEvent(NativePreviewEvent event) { | |||
if (event.getTypeInt() == Event.ONMOUSEUP) { | |||
mouseUpEventPreviewRegistration.removeHandler(); | |||
@@ -144,7 +144,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler, | |||
* Event handler for context menu. Prevents the browser context menu from | |||
* popping up if there is a listener for right clicks. | |||
*/ | |||
@Override | |||
public void onContextMenu(ContextMenuEvent event) { | |||
if (hasEventListener() && shouldFireEvent(event)) { | |||
// Prevent showing the browser's context menu when there is a right | |||
@@ -153,7 +153,6 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler, | |||
} | |||
} | |||
@Override | |||
public void onMouseDown(MouseDownEvent event) { | |||
/* | |||
* When getting a mousedown event, we must detect where the | |||
@@ -165,7 +164,6 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler, | |||
.addNativePreviewHandler(mouseUpPreviewHandler); | |||
} | |||
@Override | |||
public void onMouseUp(MouseUpEvent event) { | |||
/* | |||
* Only fire a click if the mouseup hits the same element as the | |||
@@ -209,7 +207,7 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler, | |||
* that browsers typically fail to prevent the second click event so a | |||
* double click will result in two click events and one double click event. | |||
*/ | |||
@Override | |||
public void onDoubleClick(DoubleClickEvent event) { | |||
if (hasEventListener() && shouldFireEvent(event)) { | |||
fireClick(event.getNativeEvent()); |
@@ -434,7 +434,6 @@ public class VAccordion extends VTabsheetBase { | |||
} | |||
} | |||
@Override | |||
public void onClick(ClickEvent event) { | |||
onSelectTab(this); | |||
} |
@@ -286,7 +286,6 @@ public class VButton extends FocusWidget implements ClickHandler { | |||
* com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event | |||
* .dom.client.ClickEvent) | |||
*/ | |||
@Override | |||
public void onClick(ClickEvent event) { | |||
if (BrowserInfo.get().isSafari()) { | |||
VButton.this.setFocus(true); |
@@ -101,7 +101,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* contains an image tag with the rows icon (if an icon has been | |||
* specified) and the caption of the item | |||
*/ | |||
@Override | |||
public String getDisplayString() { | |||
final StringBuffer sb = new StringBuffer(); | |||
if (iconUri != null) { | |||
@@ -124,7 +124,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
/** | |||
* Get a string that represents this item. This is used in the text box. | |||
*/ | |||
@Override | |||
public String getReplacementString() { | |||
return caption; | |||
} | |||
@@ -150,7 +150,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
/** | |||
* Executes a selection of this item. | |||
*/ | |||
@Override | |||
public void execute() { | |||
onSuggestionSelected(this); | |||
} | |||
@@ -396,6 +396,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* com.google.gwt.user.client.ui.Widget#onBrowserEvent(com.google.gwt | |||
* .user.client.Event) | |||
*/ | |||
@Override | |||
public void onBrowserEvent(Event event) { | |||
if (event.getTypeInt() == Event.ONCLICK) { | |||
@@ -453,7 +454,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* com.google.gwt.user.client.ui.PopupPanel$PositionCallback#setPosition | |||
* (int, int) | |||
*/ | |||
@Override | |||
public void setPosition(int offsetWidth, int offsetHeight) { | |||
int top = -1; | |||
@@ -546,6 +547,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* com.google.gwt.event.logical.shared.CloseHandler#onClose(com.google | |||
* .gwt.event.logical.shared.CloseEvent) | |||
*/ | |||
@Override | |||
public void onClose(CloseEvent<PopupPanel> event) { | |||
if (event.isAutoClosed()) { | |||
@@ -590,7 +592,6 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
private VLazyExecutor delayedImageLoadExecutioner = new VLazyExecutor( | |||
100, new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
if (suggestionPopup.isVisible() | |||
&& suggestionPopup.isAttached()) { | |||
@@ -748,7 +749,6 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
private static final String SUBPART_PREFIX = "item"; | |||
@Override | |||
public Element getSubPartElement(String subPart) { | |||
int index = Integer.parseInt(subPart.substring(SUBPART_PREFIX | |||
.length())); | |||
@@ -758,7 +758,6 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
return item.getElement(); | |||
} | |||
@Override | |||
public String getSubPartName(Element subElement) { | |||
if (!getElement().isOrHasChild(subElement)) { | |||
return null; | |||
@@ -781,7 +780,6 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
return null; | |||
} | |||
@Override | |||
public void onLoad(LoadEvent event) { | |||
// Handle icon onload events to ensure shadow is resized | |||
// correctly | |||
@@ -833,6 +831,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* com.google.gwt.user.client.ui.TextBoxBase#onBrowserEvent(com.google | |||
* .gwt.user.client.Event) | |||
*/ | |||
@Override | |||
public void onBrowserEvent(Event event) { | |||
super.onBrowserEvent(event); | |||
@@ -841,8 +840,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
} | |||
} | |||
@Override | |||
// Overridden to avoid selecting text when text input is disabled | |||
@Override | |||
public void setSelectionRange(int pos, int length) { | |||
if (textInputEnabled) { | |||
super.setSelectionRange(pos, length); | |||
@@ -866,6 +865,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* com.google.gwt.user.client.ui.Widget#onBrowserEvent(com.google.gwt | |||
* .user.client.Event) | |||
*/ | |||
@Override | |||
public void onBrowserEvent(Event event) { | |||
super.onBrowserEvent(event); | |||
@@ -960,7 +960,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
public VFilterSelect() { | |||
selectedItemIcon.setStyleName("v-icon"); | |||
selectedItemIcon.addLoadHandler(new LoadHandler() { | |||
@Override | |||
public void onLoad(LoadEvent event) { | |||
if (BrowserInfo.get().isIE8()) { | |||
// IE8 needs some help to discover it should reposition the | |||
@@ -1213,7 +1213,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* com.google.gwt.event.dom.client.KeyDownHandler#onKeyDown(com.google.gwt | |||
* .event.dom.client.KeyDownEvent) | |||
*/ | |||
@Override | |||
public void onKeyDown(KeyDownEvent event) { | |||
if (enabled && !readonly) { | |||
int keyCode = event.getNativeKeyCode(); | |||
@@ -1375,7 +1375,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* @param event | |||
* The KeyUpEvent of the key depressed | |||
*/ | |||
@Override | |||
public void onKeyUp(KeyUpEvent event) { | |||
if (enabled && !readonly) { | |||
switch (event.getNativeKeyCode()) { | |||
@@ -1423,7 +1423,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
/** | |||
* Listener for popupopener | |||
*/ | |||
@Override | |||
public void onClick(ClickEvent event) { | |||
if (textInputEnabled | |||
&& event.getNativeEvent().getEventTarget().cast() == tb | |||
@@ -1487,7 +1487,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* com.google.gwt.event.dom.client.FocusHandler#onFocus(com.google.gwt.event | |||
* .dom.client.FocusEvent) | |||
*/ | |||
@Override | |||
public void onFocus(FocusEvent event) { | |||
/* | |||
@@ -1525,7 +1525,6 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* .dom.client.BlurEvent) | |||
*/ | |||
@Override | |||
public void onBlur(BlurEvent event) { | |||
if (BrowserInfo.get().isIE() && preventNextBlurEventInIE) { | |||
@@ -1582,7 +1581,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, | |||
* | |||
* @see com.vaadin.terminal.gwt.client.Focusable#focus() | |||
*/ | |||
@Override | |||
public void focus() { | |||
focused = true; | |||
if (prompting && !readonly) { |
@@ -60,6 +60,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements | |||
private static final String CLASSNAME = "v-ddwrapper"; | |||
protected static final String DRAGGABLE = "draggable"; | |||
private boolean hasTooltip = false; | |||
public VDragAndDropWrapper() { | |||
super(); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
@@ -67,6 +69,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements | |||
hookHtml5Events(getElement()); | |||
setStyleName(CLASSNAME); | |||
addDomHandler(new MouseDownHandler() { | |||
public void onMouseDown(MouseDownEvent event) { | |||
if (startDrag(event.getNativeEvent())) { | |||
event.preventDefault(); // prevent text selection | |||
@@ -75,6 +78,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements | |||
}, MouseDownEvent.getType()); | |||
addDomHandler(new TouchStartHandler() { | |||
public void onTouchStart(TouchStartEvent event) { | |||
if (startDrag(event.getNativeEvent())) { | |||
/* | |||
@@ -92,7 +96,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements | |||
public void onBrowserEvent(Event event) { | |||
super.onBrowserEvent(event); | |||
if (client != null) { | |||
if (hasTooltip && client != null) { | |||
// Override child tooltips if the wrapper has a tooltip defined | |||
client.handleTooltipEvent(event, this); | |||
} | |||
} | |||
@@ -172,6 +177,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements | |||
private boolean uploading; | |||
private ReadyStateChangeHandler readyStateChangeHandler = new ReadyStateChangeHandler() { | |||
public void onReadyStateChange(XMLHttpRequest xhr) { | |||
if (xhr.getReadyState() == XMLHttpRequest.DONE) { | |||
// visit server for possible | |||
@@ -269,6 +275,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements | |||
try { | |||
dragleavetimer = new Timer() { | |||
@Override | |||
public void run() { | |||
// Yes, dragleave happens before drop. Makes no sense to me. | |||
@@ -455,6 +462,7 @@ public class VDragAndDropWrapper extends VCustomComponent implements | |||
if (detailsChanged) { | |||
currentlyValid = false; | |||
validate(new VAcceptCallback() { | |||
public void accepted(VDragEvent event) { | |||
dragAccepted(drag); | |||
} |
@@ -4,7 +4,6 @@ | |||
package com.vaadin.terminal.gwt.client.ui.form; | |||
import com.google.gwt.dom.client.Style.Display; | |||
import com.google.gwt.event.dom.client.KeyDownEvent; | |||
import com.google.gwt.event.dom.client.KeyDownHandler; | |||
import com.google.gwt.event.shared.HandlerRegistration; | |||
@@ -27,7 +26,6 @@ public class VForm extends ComplexPanel implements KeyDownHandler { | |||
Widget lo; | |||
Element legend = DOM.createLegend(); | |||
Element caption = DOM.createSpan(); | |||
private Element errorIndicatorElement = DOM.createDiv(); | |||
Element desc = DOM.createDiv(); | |||
Icon icon; | |||
VErrorMessage errorMessage = new VErrorMessage(); | |||
@@ -52,9 +50,6 @@ public class VForm extends ComplexPanel implements KeyDownHandler { | |||
setStyleName(CLASSNAME); | |||
fieldSet.appendChild(legend); | |||
legend.appendChild(caption); | |||
errorIndicatorElement.setClassName("v-errorindicator"); | |||
errorIndicatorElement.getStyle().setDisplay(Display.NONE); | |||
errorIndicatorElement.setInnerText(" "); // needed for IE | |||
desc.setClassName("v-form-description"); | |||
fieldSet.appendChild(desc); // Adding description for initial padding | |||
// measurements, removed later if no |
@@ -100,7 +100,7 @@ public class VPanel extends SimplePanel implements ShortcutActionHandlerOwner, | |||
* | |||
* @see com.vaadin.terminal.gwt.client.Focusable#focus() | |||
*/ | |||
@Override | |||
public void focus() { | |||
setFocus(true); | |||
@@ -175,7 +175,6 @@ public class VPanel extends SimplePanel implements ShortcutActionHandlerOwner, | |||
} | |||
} | |||
@Override | |||
public ShortcutActionHandler getShortcutActionHandler() { | |||
return shortcutHandler; | |||
} |
@@ -119,7 +119,7 @@ public class VRoot extends SimplePanel implements ResizeHandler, | |||
* whenever the value changes. | |||
*/ | |||
private final ValueChangeHandler<String> historyChangeHandler = new ValueChangeHandler<String>() { | |||
@Override | |||
public void onValueChange(ValueChangeEvent<String> event) { | |||
String newFragment = event.getValue(); | |||
@@ -134,7 +134,7 @@ public class VRoot extends SimplePanel implements ResizeHandler, | |||
private VLazyExecutor delayedResizeExecutor = new VLazyExecutor(200, | |||
new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
performSizeCheck(); | |||
} | |||
@@ -155,10 +155,12 @@ public class VRoot extends SimplePanel implements ResizeHandler, | |||
* Start to periodically monitor for parent element resizes if embedded | |||
* application (e.g. portlet). | |||
*/ | |||
@Override | |||
protected void onLoad() { | |||
super.onLoad(); | |||
if (isMonitoringParentSize()) { | |||
resizeTimer = new Timer() { | |||
@Override | |||
public void run() { | |||
// trigger check to see if parent size has changed, | |||
@@ -189,6 +191,7 @@ public class VRoot extends SimplePanel implements ResizeHandler, | |||
/** | |||
* Stop monitoring for parent element resizes. | |||
*/ | |||
@Override | |||
protected void onUnload() { | |||
if (resizeTimer != null) { | |||
@@ -354,7 +357,7 @@ public class VRoot extends SimplePanel implements ResizeHandler, | |||
* com.google.gwt.event.logical.shared.ResizeHandler#onResize(com.google | |||
* .gwt.event.logical.shared.ResizeEvent) | |||
*/ | |||
@Override | |||
public void onResize(ResizeEvent event) { | |||
triggerSizeChangeCheck(); | |||
} | |||
@@ -410,7 +413,6 @@ public class VRoot extends SimplePanel implements ResizeHandler, | |||
$wnd.location = url; | |||
}-*/; | |||
@Override | |||
public void onWindowClosing(Window.ClosingEvent event) { | |||
// Change focus on this window in order to ensure that all state is | |||
// collected from textfields | |||
@@ -430,12 +432,10 @@ public class VRoot extends SimplePanel implements ResizeHandler, | |||
} | |||
}-*/; | |||
@Override | |||
public ShortcutActionHandler getShortcutActionHandler() { | |||
return actionHandler; | |||
} | |||
@Override | |||
public void focus() { | |||
getElement().focus(); | |||
} |
@@ -52,6 +52,7 @@ public class VSlider extends SimpleFocusablePanel implements Field, | |||
private final HTML feedback = new HTML("", false); | |||
private final VOverlay feedbackPopup = new VOverlay(true, false, true) { | |||
@Override | |||
public void show() { | |||
super.show(); | |||
@@ -78,7 +79,6 @@ public class VSlider extends SimpleFocusablePanel implements Field, | |||
private VLazyExecutor delayedValueUpdater = new VLazyExecutor(100, | |||
new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
updateValueToServer(); | |||
acceleration = 1; | |||
@@ -161,7 +161,7 @@ public class VSlider extends SimpleFocusablePanel implements Field, | |||
// (supposedly) been drawn completely. | |||
DOM.setStyleAttribute(base, styleAttribute, MIN_SIZE + "px"); | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
final Element p = DOM.getParent(getElement()); | |||
if (DOM.getElementPropertyInt(p, domProperty) > (MIN_SIZE + 5)) { | |||
@@ -422,7 +422,6 @@ public class VSlider extends SimpleFocusablePanel implements Field, | |||
} | |||
} | |||
@Override | |||
public void iLayout() { | |||
if (vertical) { | |||
setHeight(); |
@@ -41,7 +41,6 @@ public abstract class AbstractSplitPanelConnector extends | |||
getWidget().addHandler(new SplitterMoveHandler() { | |||
@Override | |||
public void splitterMoved(SplitterMoveEvent event) { | |||
String position = getWidget().getSplitterPosition(); | |||
float pos = 0; | |||
@@ -62,7 +61,6 @@ public abstract class AbstractSplitPanelConnector extends | |||
}, SplitterMoveEvent.TYPE); | |||
} | |||
@Override | |||
public void updateCaption(ComponentConnector component) { | |||
// TODO Implement caption handling | |||
} | |||
@@ -147,7 +145,6 @@ public abstract class AbstractSplitPanelConnector extends | |||
getWidget().ensureScrollable(); | |||
} | |||
@Override | |||
public void layout() { | |||
VAbstractSplitPanel splitPanel = getWidget(); | |||
splitPanel.setSplitPosition(splitPanel.position); |
@@ -126,14 +126,12 @@ public class VAbstractSplitPanel extends ComplexPanel { | |||
firstContainer, secondContainer); | |||
addDomHandler(new TouchCancelHandler() { | |||
@Override | |||
public void onTouchCancel(TouchCancelEvent event) { | |||
// TODO When does this actually happen?? | |||
VConsole.log("TOUCH CANCEL"); | |||
} | |||
}, TouchCancelEvent.getType()); | |||
addDomHandler(new TouchStartHandler() { | |||
@Override | |||
public void onTouchStart(TouchStartEvent event) { | |||
Node target = event.getTouches().get(0).getTarget().cast(); | |||
if (splitter.isOrHasChild(target)) { | |||
@@ -142,7 +140,6 @@ public class VAbstractSplitPanel extends ComplexPanel { | |||
} | |||
}, TouchStartEvent.getType()); | |||
addDomHandler(new TouchMoveHandler() { | |||
@Override | |||
public void onTouchMove(TouchMoveEvent event) { | |||
if (resizing) { | |||
onMouseMove(Event.as(event.getNativeEvent())); | |||
@@ -150,7 +147,6 @@ public class VAbstractSplitPanel extends ComplexPanel { | |||
} | |||
}, TouchMoveEvent.getType()); | |||
addDomHandler(new TouchEndHandler() { | |||
@Override | |||
public void onTouchEnd(TouchEndEvent event) { | |||
if (resizing) { | |||
onMouseUp(Event.as(event.getNativeEvent())); |
@@ -272,6 +272,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* | |||
* @see java.lang.Object#toString() | |||
*/ | |||
@Override | |||
public String toString() { | |||
return startRow.getKey() + "-" + length; | |||
@@ -325,7 +326,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
final FocusableScrollPanel scrollBodyPanel = new FocusableScrollPanel(true); | |||
private KeyPressHandler navKeyPressHandler = new KeyPressHandler() { | |||
@Override | |||
public void onKeyPress(KeyPressEvent keyPressEvent) { | |||
// This is used for Firefox only, since Firefox auto-repeat | |||
// works correctly only if we use a key press handler, other | |||
@@ -363,7 +364,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
private KeyUpHandler navKeyUpHandler = new KeyUpHandler() { | |||
@Override | |||
public void onKeyUp(KeyUpEvent keyUpEvent) { | |||
NativeEvent event = keyUpEvent.getNativeEvent(); | |||
int keyCode = event.getKeyCode(); | |||
@@ -391,7 +391,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
private KeyDownHandler navKeyDownHandler = new KeyDownHandler() { | |||
@Override | |||
public void onKeyDown(KeyDownEvent keyDownEvent) { | |||
NativeEvent event = keyDownEvent.getNativeEvent(); | |||
// This is not used for Firefox | |||
@@ -519,7 +518,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
scrollBodyPanel.sinkEvents(Event.ONCONTEXTMENU); | |||
scrollBodyPanel.addDomHandler(new ContextMenuHandler() { | |||
@Override | |||
public void onContextMenu(ContextMenuEvent event) { | |||
handleBodyContextMenu(event); | |||
} | |||
@@ -539,7 +538,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
// Add a handler to clear saved context menu details when the menu | |||
// closes. See #8526. | |||
client.getContextMenu().addCloseHandler(new CloseHandler<PopupPanel>() { | |||
@Override | |||
public void onClose(CloseEvent<PopupPanel> event) { | |||
contextMenu = null; | |||
} | |||
@@ -1848,7 +1847,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
if (firstvisible > 0) { | |||
// Deferred due to some Firefox oddities | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
scrollBodyPanel | |||
.setScrollPosition(measureRowHeightOffset(firstvisible)); | |||
@@ -1883,7 +1882,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
*/ | |||
scrollBody.reLayoutComponents(); | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
Util.runWebkitOverflowAutoFix(scrollBodyPanel.getElement()); | |||
} | |||
@@ -2214,7 +2213,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
setWidth(tdWidth + "px"); | |||
} else { | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
int tdWidth = width | |||
+ scrollBody.getCellExtraWidth(); | |||
@@ -2268,6 +2267,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
/** | |||
* Handle column reordering. | |||
*/ | |||
@Override | |||
public void onBrowserEvent(Event event) { | |||
if (enabled && event != null) { | |||
@@ -2811,7 +2811,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
final int newWidth = width; | |||
Scheduler.get().scheduleDeferred( | |||
new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
setColWidth(colIx, newWidth, true); | |||
} | |||
@@ -2839,7 +2839,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
if (refreshContentWidths) { | |||
// Recalculate the column sizings if any column has changed | |||
Scheduler.get().scheduleDeferred(new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
triggerLazyColumnAdjustment(true); | |||
} | |||
@@ -2951,7 +2951,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
visibleCells.add(newIndex, hCell); | |||
} | |||
@Override | |||
public Iterator<Widget> iterator() { | |||
return visibleCells.iterator(); | |||
} | |||
@@ -3074,6 +3073,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
/** | |||
* Override default method to distinguish on/off columns | |||
*/ | |||
@Override | |||
public String getHTML() { | |||
final StringBuffer buf = new StringBuffer(); | |||
@@ -3099,7 +3099,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
/* | |||
* Returns columns as Action array for column select popup | |||
*/ | |||
@Override | |||
public Action[] getActions() { | |||
Object[] cols; | |||
if (columnReordering && columnOrder != null) { | |||
@@ -3138,12 +3138,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
return actions; | |||
} | |||
@Override | |||
public ApplicationConnection getClient() { | |||
return client; | |||
} | |||
@Override | |||
public String getPaintableId() { | |||
return paintableId; | |||
} | |||
@@ -3319,7 +3317,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
setWidth(tdWidth + "px"); | |||
} else { | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
int borderWidths = 1; | |||
int tdWidth = width | |||
@@ -3566,6 +3564,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* com.google.gwt.user.client.ui.Panel#remove(com.google.gwt.user.client | |||
* .ui.Widget) | |||
*/ | |||
@Override | |||
public boolean remove(Widget w) { | |||
if (visibleCells.contains(w)) { | |||
@@ -3582,7 +3581,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* | |||
* @see com.google.gwt.user.client.ui.HasWidgets#iterator() | |||
*/ | |||
@Override | |||
public Iterator<Widget> iterator() { | |||
return visibleCells.iterator(); | |||
} | |||
@@ -4121,7 +4120,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
renderedRows.add(actualIx, row); | |||
} | |||
@Override | |||
public Iterator<Widget> iterator() { | |||
return renderedRows.iterator(); | |||
} | |||
@@ -4720,7 +4718,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
childWidgets.add(w); | |||
} | |||
@Override | |||
public Iterator<Widget> iterator() { | |||
return childWidgets.iterator(); | |||
} | |||
@@ -4841,6 +4838,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
if (dragmode != 0) { | |||
if (dragTouchTimeout == null) { | |||
dragTouchTimeout = new Timer() { | |||
@Override | |||
public void run() { | |||
if (touchStart != null) { | |||
@@ -4857,6 +4855,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
if (actionKeys != null) { | |||
if (contextTouchTimeout == null) { | |||
contextTouchTimeout = new Timer() { | |||
@Override | |||
public void run() { | |||
if (touchStart != null) { | |||
@@ -4927,6 +4926,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
/* | |||
* React on click that occur on content cells only | |||
*/ | |||
@Override | |||
public void onBrowserEvent(final Event event) { | |||
@@ -5124,6 +5124,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
touchStart.preventDefault(); | |||
if (dragmode != 0 || actionKeys != null) { | |||
new Timer() { | |||
@Override | |||
public void run() { | |||
TouchScrollDelegate activeScrollDelegate = TouchScrollDelegate | |||
@@ -5162,6 +5163,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
if (contextTouchTimeout == null | |||
&& actionKeys != null) { | |||
contextTouchTimeout = new Timer() { | |||
@Override | |||
public void run() { | |||
if (touchStart != null) { | |||
@@ -5427,7 +5429,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* | |||
* @see com.vaadin.terminal.gwt.client.ui.IActionOwner#getActions () | |||
*/ | |||
@Override | |||
public Action[] getActions() { | |||
if (actionKeys == null) { | |||
return new Action[] {}; | |||
@@ -5437,6 +5439,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
final String actionKey = actionKeys[i]; | |||
final TreeAction a = new TreeAction(this, | |||
String.valueOf(rowKey), actionKey) { | |||
@Override | |||
public void execute() { | |||
super.execute(); | |||
@@ -5450,12 +5453,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
return actions; | |||
} | |||
@Override | |||
public ApplicationConnection getClient() { | |||
return client; | |||
} | |||
@Override | |||
public String getPaintableId() { | |||
return paintableId; | |||
} | |||
@@ -5506,7 +5507,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
// widths. | |||
Scheduler.get().scheduleDeferred(new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
if (showRowHeaders) { | |||
setCellWidth(0, tHead.getHeaderCell(0).getWidth()); | |||
@@ -5727,6 +5727,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* column widths "optimally". Doing this lazily to avoid expensive | |||
* calculation when resizing is not yet finished. | |||
*/ | |||
@Override | |||
public void run() { | |||
if (scrollBody == null) { | |||
@@ -5836,7 +5837,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
} | |||
scrollBody.reLayoutComponents(); | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
Util.runWebkitOverflowAutoFix(scrollBodyPanel.getElement()); | |||
} | |||
@@ -5957,7 +5958,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
// overwriting the scroll position with an outdated value, see | |||
// #7607. | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
Util.runWebkitOverflowAutoFix(scrollBodyPanel.getElement()); | |||
} | |||
@@ -5979,6 +5980,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* lost). Example ITabPanel just set contained components invisible and back | |||
* when changing tabs. | |||
*/ | |||
@Override | |||
public void setVisible(boolean visible) { | |||
if (isVisible() != visible) { | |||
@@ -5986,7 +5988,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
if (initializedAndAttached) { | |||
if (visible) { | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
scrollBodyPanel | |||
.setScrollPosition(measureRowHeightOffset(firstRowInViewPort)); | |||
@@ -6020,7 +6022,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* This method has logic which rows needs to be requested from server when | |||
* user scrolls | |||
*/ | |||
@Override | |||
public void onScroll(ScrollEvent event) { | |||
scrollLeft = scrollBodyPanel.getElement().getScrollLeft(); | |||
scrollTop = scrollBodyPanel.getScrollPosition(); | |||
@@ -6049,7 +6051,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
// correct | |||
// value available soon. | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
onScroll(null); | |||
} | |||
@@ -6130,7 +6132,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
return (int) Math.ceil(scrollTop / scrollBody.getRowHeight()); | |||
} | |||
@Override | |||
public VScrollTableDropHandler getDropHandler() { | |||
return dropHandler; | |||
} | |||
@@ -6151,7 +6152,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
return false; | |||
} | |||
// @Override | |||
// | |||
// public int hashCode() { | |||
// return overkey; | |||
// } | |||
@@ -6210,7 +6211,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
deEmphasis(); | |||
final TableDDDetails newDetails = dropDetails; | |||
VAcceptCallback cb = new VAcceptCallback() { | |||
@Override | |||
public void accepted(VDragEvent event) { | |||
if (newDetails.equals(dropDetails)) { | |||
dragAccepted(event); | |||
@@ -6287,7 +6288,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
return ConnectorMap.get(client).getConnector(VScrollTable.this); | |||
} | |||
@Override | |||
public ApplicationConnection getApplicationConnection() { | |||
return client; | |||
} | |||
@@ -6618,7 +6618,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* com.google.gwt.event.dom.client.FocusHandler#onFocus(com.google.gwt.event | |||
* .dom.client.FocusEvent) | |||
*/ | |||
@Override | |||
public void onFocus(FocusEvent event) { | |||
if (isFocusable()) { | |||
hasFocus = true; | |||
@@ -6639,7 +6639,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* com.google.gwt.event.dom.client.BlurHandler#onBlur(com.google.gwt.event | |||
* .dom.client.BlurEvent) | |||
*/ | |||
@Override | |||
public void onBlur(BlurEvent event) { | |||
hasFocus = false; | |||
navKeyDown = false; | |||
@@ -6712,7 +6712,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
* | |||
* @see com.vaadin.terminal.gwt.client.Focusable#focus() | |||
*/ | |||
@Override | |||
public void focus() { | |||
if (isFocusable()) { | |||
scrollBodyPanel.focus(); | |||
@@ -6756,6 +6756,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
public void startScrollingVelocityTimer() { | |||
if (scrollingVelocityTimer == null) { | |||
scrollingVelocityTimer = new Timer() { | |||
@Override | |||
public void run() { | |||
scrollingVelocity++; | |||
@@ -6792,7 +6793,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
public void lazyRevertFocusToRow(final VScrollTableRow currentlyFocusedRow) { | |||
Scheduler.get().scheduleFinally(new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
if (currentlyFocusedRow != null) { | |||
setRowFocus(currentlyFocusedRow); | |||
@@ -6805,7 +6806,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
}); | |||
} | |||
@Override | |||
public Action[] getActions() { | |||
if (bodyActionKeys == null) { | |||
return new Action[] {}; | |||
@@ -6821,12 +6821,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | |||
return actions; | |||
} | |||
@Override | |||
public ApplicationConnection getClient() { | |||
return client; | |||
} | |||
@Override | |||
public String getPaintableId() { | |||
return paintableId; | |||
} |
@@ -212,17 +212,14 @@ public class VTabsheet extends VTabsheetBase implements Focusable, | |||
tabCaption.setWidth(tabCaption.getRequiredWidth() + "px"); | |||
} | |||
@Override | |||
public HandlerRegistration addFocusHandler(FocusHandler handler) { | |||
return addDomHandler(handler, FocusEvent.getType()); | |||
} | |||
@Override | |||
public HandlerRegistration addBlurHandler(BlurHandler handler) { | |||
return addDomHandler(handler, BlurEvent.getType()); | |||
} | |||
@Override | |||
public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) { | |||
return addDomHandler(handler, KeyDownEvent.getType()); | |||
} | |||
@@ -365,7 +362,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable, | |||
setElement(el); | |||
} | |||
@Override | |||
public void onClose(VCloseEvent event) { | |||
Tab tab = event.getTab(); | |||
if (!tab.isEnabledOnServer()) { | |||
@@ -401,7 +397,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable, | |||
return t; | |||
} | |||
@Override | |||
public void onClick(ClickEvent event) { | |||
TabCaption caption = (TabCaption) event.getSource(); | |||
Element targetElement = event.getNativeEvent().getEventTarget() | |||
@@ -1038,7 +1033,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, | |||
final Style style = scroller.getStyle(); | |||
style.setProperty("whiteSpace", "normal"); | |||
Scheduler.get().scheduleDeferred(new Command() { | |||
@Override | |||
public void execute() { | |||
style.setProperty("whiteSpace", ""); | |||
} | |||
@@ -1123,7 +1118,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable, | |||
} | |||
} | |||
@Override | |||
public void onBlur(BlurEvent event) { | |||
if (focusedTab != null && event.getSource() instanceof Tab) { | |||
focusedTab = null; | |||
@@ -1133,7 +1127,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable, | |||
} | |||
} | |||
@Override | |||
public void onFocus(FocusEvent event) { | |||
if (focusedTab == null && event.getSource() instanceof Tab) { | |||
focusedTab = (Tab) event.getSource(); | |||
@@ -1143,7 +1136,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable, | |||
} | |||
} | |||
@Override | |||
public void focus() { | |||
tb.getTab(activeTabIndex).focus(); | |||
} | |||
@@ -1152,7 +1144,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable, | |||
tb.getTab(activeTabIndex).blur(); | |||
} | |||
@Override | |||
public void onKeyDown(KeyDownEvent event) { | |||
if (event.getSource() instanceof Tab) { | |||
int keycode = event.getNativeEvent().getKeyCode(); |
@@ -146,7 +146,6 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
private VLazyExecutor delayedContentsSizeUpdater = new VLazyExecutor(200, | |||
new ScheduledCommand() { | |||
@Override | |||
public void execute() { | |||
updateContentsSize(); | |||
} | |||
@@ -266,7 +265,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
if (!orderingDefered) { | |||
orderingDefered = true; | |||
Scheduler.get().scheduleFinally(new Command() { | |||
@Override | |||
public void execute() { | |||
doServerSideOrdering(); | |||
VNotification.bringNotificationsToFront(); | |||
@@ -279,7 +278,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
orderingDefered = false; | |||
VWindow[] array = windowOrder.toArray(new VWindow[windowOrder.size()]); | |||
Arrays.sort(array, new Comparator<VWindow>() { | |||
@Override | |||
public int compare(VWindow o1, VWindow o2) { | |||
/* | |||
* Order by modality, then by bringtofront sequence. | |||
@@ -857,12 +856,10 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
true); | |||
} | |||
@Override | |||
public ShortcutActionHandler getShortcutActionHandler() { | |||
return shortcutHandler; | |||
} | |||
@Override | |||
public void onScroll(ScrollEvent event) { | |||
client.updateVariable(id, "scrollTop", | |||
contentPanel.getScrollPosition(), false); | |||
@@ -871,7 +868,6 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
} | |||
@Override | |||
public void onKeyDown(KeyDownEvent event) { | |||
if (shortcutHandler != null) { | |||
shortcutHandler | |||
@@ -880,21 +876,18 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, | |||
} | |||
} | |||
@Override | |||
public void onBlur(BlurEvent event) { | |||
if (client.hasEventListeners(this, EventId.BLUR)) { | |||
client.updateVariable(id, EventId.BLUR, "", true); | |||
} | |||
} | |||
@Override | |||
public void onFocus(FocusEvent event) { | |||
if (client.hasEventListeners(this, EventId.FOCUS)) { | |||
client.updateVariable(id, EventId.FOCUS, "", true); | |||
} | |||
} | |||
@Override | |||
public void focus() { | |||
contentPanel.focus(); | |||
} |
@@ -175,7 +175,6 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet | |||
this.portlet = portlet; | |||
} | |||
@Override | |||
public void criticalNotification(WrappedRequest request, | |||
WrappedResponse response, String cap, String msg, | |||
String details, String outOfSyncURL) throws IOException { | |||
@@ -213,7 +212,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet | |||
private boolean productionMode = false; | |||
private DeploymentConfiguration deploymentConfiguration = new DeploymentConfiguration() { | |||
@Override | |||
public String getConfiguredWidgetset(WrappedRequest request) { | |||
String widgetset = getApplicationOrSystemProperty( | |||
@@ -234,7 +233,6 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet | |||
return widgetset; | |||
} | |||
@Override | |||
public String getConfiguredTheme(WrappedRequest request) { | |||
// is the default theme defined by the portal? | |||
@@ -249,14 +247,12 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet | |||
return themeName; | |||
} | |||
@Override | |||
public String getApplicationOrSystemProperty(String propertyName, | |||
String defaultValue) { | |||
return AbstractApplicationPortlet.this | |||
.getApplicationOrSystemProperty(propertyName, defaultValue); | |||
} | |||
@Override | |||
public boolean isStandalone(WrappedRequest request) { | |||
return false; | |||
} | |||
@@ -275,7 +271,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet | |||
* @return The location of static resources (inside which there should | |||
* be a VAADIN directory). Does not end with a slash (/). | |||
*/ | |||
@Override | |||
public String getStaticFileLocation(WrappedRequest request) { | |||
String staticFileLocation = WrappedPortletRequest.cast(request) | |||
.getPortalProperty( | |||
@@ -293,7 +289,6 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet | |||
} | |||
} | |||
@Override | |||
public ClassLoader getClassLoader() { | |||
// Custom class loaders not currently supported in portlets (see | |||
// #8574) | |||
@@ -1070,7 +1065,6 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet | |||
this.throwable = throwable; | |||
} | |||
@Override | |||
public Throwable getThrowable() { | |||
return throwable; | |||
} |
@@ -74,7 +74,6 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements | |||
this.servlet = servlet; | |||
} | |||
@Override | |||
public void criticalNotification(WrappedRequest request, | |||
WrappedResponse response, String cap, String msg, | |||
String details, String outOfSyncURL) throws IOException { | |||
@@ -97,7 +96,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements | |||
private int resourceCacheTime = 3600; | |||
private DeploymentConfiguration deploymentConfiguration = new DeploymentConfiguration() { | |||
@Override | |||
public String getStaticFileLocation(WrappedRequest request) { | |||
HttpServletRequest servletRequest = WrappedHttpServletRequest | |||
.cast(request); | |||
@@ -105,32 +104,27 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements | |||
.getStaticFilesLocation(servletRequest); | |||
} | |||
@Override | |||
public String getConfiguredWidgetset(WrappedRequest request) { | |||
return getApplicationOrSystemProperty( | |||
AbstractApplicationServlet.PARAMETER_WIDGETSET, | |||
AbstractApplicationServlet.DEFAULT_WIDGETSET); | |||
} | |||
@Override | |||
public String getConfiguredTheme(WrappedRequest request) { | |||
// Use the default | |||
return AbstractApplicationServlet.getDefaultTheme(); | |||
} | |||
@Override | |||
public String getApplicationOrSystemProperty(String propertyName, | |||
String defaultValue) { | |||
return AbstractApplicationServlet.this | |||
.getApplicationOrSystemProperty(propertyName, defaultValue); | |||
} | |||
@Override | |||
public boolean isStandalone(WrappedRequest request) { | |||
return true; | |||
} | |||
@Override | |||
public ClassLoader getClassLoader() { | |||
try { | |||
return AbstractApplicationServlet.this.getClassLoader(); | |||
@@ -153,8 +147,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements | |||
* if an exception has occurred that interferes with the | |||
* servlet's normal operation. | |||
*/ | |||
@SuppressWarnings("unchecked") | |||
@Override | |||
@SuppressWarnings("unchecked") | |||
public void init(javax.servlet.ServletConfig servletConfig) | |||
throws javax.servlet.ServletException { | |||
super.init(servletConfig); | |||
@@ -337,6 +331,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements | |||
* @throws IOException | |||
* if the request for the TRACE cannot be handled. | |||
*/ | |||
@Override | |||
protected void service(HttpServletRequest request, | |||
HttpServletResponse response) throws ServletException, IOException { | |||
@@ -1137,7 +1132,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements | |||
* parameter in web.xml | |||
*/ | |||
response.setHeader("Cache-Control", | |||
"max-age: " + String.valueOf(resourceCacheTime)); | |||
"max-age= " + String.valueOf(resourceCacheTime)); | |||
} | |||
// Write the resource to the client. | |||
@@ -1683,7 +1678,6 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements | |||
this.throwable = throwable; | |||
} | |||
@Override | |||
public Throwable getThrowable() { | |||
return throwable; | |||
} |
@@ -1189,7 +1189,7 @@ public abstract class AbstractCommunicationManager implements Serializable { | |||
// containers rely on that their updateFromUIDL method has been called | |||
// before children start calling e.g. updateCaption | |||
Collections.sort(paintables, new Comparator<Component>() { | |||
@Override | |||
public int compare(Component c1, Component c2) { | |||
int depth1 = 0; | |||
while (c1.getParent() != null) { | |||
@@ -1276,17 +1276,14 @@ public abstract class AbstractCommunicationManager implements Serializable { | |||
private static class NullIterator<E> implements Iterator<E> { | |||
@Override | |||
public boolean hasNext() { | |||
return false; | |||
} | |||
@Override | |||
public E next() { | |||
return null; | |||
} | |||
@Override | |||
public void remove() { | |||
} | |||
@@ -1732,7 +1729,6 @@ public abstract class AbstractCommunicationManager implements Serializable { | |||
this.throwable = throwable; | |||
} | |||
@Override | |||
public Throwable getThrowable() { | |||
return throwable; | |||
} |
@@ -43,7 +43,6 @@ public class DragAndDropService implements VariableOwner, ClientConnector { | |||
this.manager = manager; | |||
} | |||
@Override | |||
public void changeVariables(Object source, Map<String, Object> variables) { | |||
Object owner = variables.get("dhowner"); | |||
@@ -182,12 +181,10 @@ public class DragAndDropService implements VariableOwner, ClientConnector { | |||
return transferable; | |||
} | |||
@Override | |||
public boolean isEnabled() { | |||
return isConnectorEnabled(); | |||
} | |||
@Override | |||
public boolean isImmediate() { | |||
return true; | |||
} | |||
@@ -221,82 +218,68 @@ public class DragAndDropService implements VariableOwner, ClientConnector { | |||
return false; | |||
} | |||
@Override | |||
public SharedState getState() { | |||
// TODO Auto-generated method stub | |||
return null; | |||
} | |||
@Override | |||
public String getConnectorId() { | |||
return VDragAndDropManager.DD_SERVICE; | |||
} | |||
@Override | |||
public boolean isConnectorEnabled() { | |||
// Drag'n'drop can't be disabled | |||
return true; | |||
} | |||
@Override | |||
public List<ClientMethodInvocation> retrievePendingRpcCalls() { | |||
return null; | |||
} | |||
@Override | |||
public RpcManager getRpcManager(Class<?> rpcInterface) { | |||
// TODO Use rpc for drag'n'drop | |||
return null; | |||
} | |||
@Override | |||
public Class<? extends SharedState> getStateType() { | |||
return SharedState.class; | |||
} | |||
@Override | |||
public void requestRepaint() { | |||
// TODO Auto-generated method stub | |||
} | |||
@Override | |||
public ClientConnector getParent() { | |||
// TODO Auto-generated method stub | |||
return null; | |||
} | |||
@Override | |||
public void requestRepaintAll() { | |||
// TODO Auto-generated method stub | |||
} | |||
@Override | |||
public void setParent(ClientConnector parent) { | |||
// TODO Auto-generated method stub | |||
} | |||
@Override | |||
public void attach() { | |||
// TODO Auto-generated method stub | |||
} | |||
@Override | |||
public void detach() { | |||
// TODO Auto-generated method stub | |||
} | |||
@Override | |||
public Collection<Extension> getExtensions() { | |||
// TODO Auto-generated method stub | |||
return Collections.emptySet(); | |||
} | |||
@Override | |||
public void removeExtension(Extension extension) { | |||
// TODO Auto-generated method stub | |||
} |
@@ -104,7 +104,6 @@ public class JsonPaintTarget implements PaintTarget { | |||
cacheEnabled = cachingRequired; | |||
} | |||
@Override | |||
public void startTag(String tagName) throws PaintException { | |||
startTag(tagName, false); | |||
} | |||
@@ -160,7 +159,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* @throws Paintexception | |||
* if the paint operation failed. | |||
*/ | |||
@Override | |||
public void endTag(String tagName) throws PaintException { | |||
// In case of null data output nothing: | |||
if (tagName == null) { | |||
@@ -327,17 +326,15 @@ public class JsonPaintTarget implements PaintTarget { | |||
* if the paint operation failed. | |||
* | |||
*/ | |||
@Override | |||
public void addText(String str) throws PaintException { | |||
tag.addData("\"" + escapeJSON(str) + "\""); | |||
} | |||
@Override | |||
public void addAttribute(String name, boolean value) throws PaintException { | |||
tag.addAttribute("\"" + name + "\":" + (value ? "true" : "false")); | |||
} | |||
@Override | |||
@SuppressWarnings("deprecation") | |||
public void addAttribute(String name, Resource value) throws PaintException { | |||
@@ -367,27 +364,22 @@ public class JsonPaintTarget implements PaintTarget { | |||
} | |||
@Override | |||
public void addAttribute(String name, int value) throws PaintException { | |||
tag.addAttribute("\"" + name + "\":" + String.valueOf(value)); | |||
} | |||
@Override | |||
public void addAttribute(String name, long value) throws PaintException { | |||
tag.addAttribute("\"" + name + "\":" + String.valueOf(value)); | |||
} | |||
@Override | |||
public void addAttribute(String name, float value) throws PaintException { | |||
tag.addAttribute("\"" + name + "\":" + String.valueOf(value)); | |||
} | |||
@Override | |||
public void addAttribute(String name, double value) throws PaintException { | |||
tag.addAttribute("\"" + name + "\":" + String.valueOf(value)); | |||
} | |||
@Override | |||
public void addAttribute(String name, String value) throws PaintException { | |||
// In case of null data output nothing: | |||
if ((value == null) || (name == null)) { | |||
@@ -407,14 +399,12 @@ public class JsonPaintTarget implements PaintTarget { | |||
} | |||
@Override | |||
public void addAttribute(String name, Component value) | |||
throws PaintException { | |||
final String id = value.getConnectorId(); | |||
addAttribute(name, id); | |||
} | |||
@Override | |||
public void addAttribute(String name, Map<?, ?> value) | |||
throws PaintException { | |||
@@ -452,7 +442,6 @@ public class JsonPaintTarget implements PaintTarget { | |||
tag.addAttribute(sb.toString()); | |||
} | |||
@Override | |||
public void addAttribute(String name, Object[] values) { | |||
// In case of null data output nothing: | |||
if ((values == null) || (name == null)) { | |||
@@ -473,49 +462,41 @@ public class JsonPaintTarget implements PaintTarget { | |||
tag.addAttribute(buf.toString()); | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, String value) | |||
throws PaintException { | |||
tag.addVariable(new StringVariable(owner, name, escapeJSON(value))); | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, Component value) | |||
throws PaintException { | |||
tag.addVariable(new StringVariable(owner, name, value.getConnectorId())); | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, int value) | |||
throws PaintException { | |||
tag.addVariable(new IntVariable(owner, name, value)); | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, long value) | |||
throws PaintException { | |||
tag.addVariable(new LongVariable(owner, name, value)); | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, float value) | |||
throws PaintException { | |||
tag.addVariable(new FloatVariable(owner, name, value)); | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, double value) | |||
throws PaintException { | |||
tag.addVariable(new DoubleVariable(owner, name, value)); | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, boolean value) | |||
throws PaintException { | |||
tag.addVariable(new BooleanVariable(owner, name, value)); | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, String[] value) | |||
throws PaintException { | |||
tag.addVariable(new ArrayVariable(owner, name, value)); | |||
@@ -534,7 +515,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* @throws PaintException | |||
* if the paint operation failed. | |||
*/ | |||
@Override | |||
public void addUploadStreamVariable(VariableOwner owner, String name) | |||
throws PaintException { | |||
startTag("uploadstream"); | |||
@@ -554,7 +535,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* @throws PaintException | |||
* if the paint operation failed. | |||
*/ | |||
@Override | |||
public void addSection(String sectionTagName, String sectionData) | |||
throws PaintException { | |||
tag.addData("{\"" + sectionTagName + "\":\"" + escapeJSON(sectionData) | |||
@@ -569,7 +550,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* @throws PaintException | |||
* if the paint operation failed. | |||
*/ | |||
@Override | |||
public void addUIDL(String xml) throws PaintException { | |||
// Ensure that the target is open | |||
@@ -603,7 +584,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* @see com.vaadin.terminal.PaintTarget#addXMLSection(String, String, | |||
* String) | |||
*/ | |||
@Override | |||
public void addXMLSection(String sectionTagName, String sectionData, | |||
String namespace) throws PaintException { | |||
@@ -668,7 +649,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* @see com.vaadin.terminal.PaintTarget#startPaintable(com.vaadin.terminal | |||
* .Paintable, java.lang.String) | |||
*/ | |||
@Override | |||
public PaintStatus startPaintable(Component connector, String tagName) | |||
throws PaintException { | |||
boolean topLevelPaintable = openPaintables.isEmpty(); | |||
@@ -695,7 +676,6 @@ public class JsonPaintTarget implements PaintTarget { | |||
return PaintStatus.PAINTING; | |||
} | |||
@Override | |||
public void endPaintable(Component paintable) throws PaintException { | |||
getLogger().fine( | |||
"endPaintable for " + paintable.getClass().getName() + "@" | |||
@@ -718,7 +698,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* | |||
* @see com.vaadin.terminal.PaintTarget#addCharacterData(java.lang.String ) | |||
*/ | |||
@Override | |||
public void addCharacterData(String text) throws PaintException { | |||
if (text != null) { | |||
tag.addData(text); | |||
@@ -988,7 +968,6 @@ public class JsonPaintTarget implements PaintTarget { | |||
return usedResources; | |||
} | |||
@Override | |||
@SuppressWarnings("unchecked") | |||
public String getTag(ClientConnector clientConnector) { | |||
Class<? extends ClientConnector> clientConnectorClass = clientConnector | |||
@@ -1011,7 +990,6 @@ public class JsonPaintTarget implements PaintTarget { | |||
return usedClientConnectors; | |||
} | |||
@Override | |||
public void addVariable(VariableOwner owner, String name, | |||
StreamVariable value) throws PaintException { | |||
String url = manager.getStreamVariableTargetUrl((Connector) owner, | |||
@@ -1027,7 +1005,7 @@ public class JsonPaintTarget implements PaintTarget { | |||
* | |||
* @see com.vaadin.terminal.PaintTarget#isFullRepaint() | |||
*/ | |||
@Override | |||
public boolean isFullRepaint() { | |||
return !cacheEnabled; | |||
} |
@@ -41,7 +41,7 @@ public class WebBrowser implements Terminal { | |||
* | |||
* @return Always returns null. | |||
*/ | |||
@Override | |||
public String getDefaultTheme() { | |||
return null; | |||
} | |||
@@ -51,7 +51,7 @@ public class WebBrowser implements Terminal { | |||
* | |||
* @see com.vaadin.terminal.Terminal#getScreenHeight() | |||
*/ | |||
@Override | |||
public int getScreenHeight() { | |||
return screenHeight; | |||
} | |||
@@ -61,7 +61,7 @@ public class WebBrowser implements Terminal { | |||
* | |||
* @see com.vaadin.terminal.Terminal#getScreenWidth() | |||
*/ | |||
@Override | |||
public int getScreenWidth() { | |||
return screenWidth; | |||
} |
@@ -58,7 +58,6 @@ public class ClassPathExplorer { | |||
* File filter that only accepts directories. | |||
*/ | |||
private final static FileFilter DIRECTORIES_ONLY = new FileFilter() { | |||
@Override | |||
public boolean accept(File f) { | |||
if (f.exists() && f.isDirectory()) { | |||
return true; |
@@ -38,13 +38,11 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
private AbstractSplitPanelRpc rpc = new AbstractSplitPanelRpc() { | |||
@Override | |||
public void splitterClick(MouseEventDetails mouseDetails) { | |||
fireEvent(new SplitterClickEvent(AbstractSplitPanel.this, | |||
mouseDetails)); | |||
} | |||
@Override | |||
public void setSplitterPosition(float position) { | |||
getSplitterState().setPosition(position); | |||
} | |||
@@ -65,7 +63,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
int i = 0; | |||
@Override | |||
public boolean hasNext() { | |||
if (i < getComponentCount()) { | |||
return true; | |||
@@ -73,7 +70,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
return false; | |||
} | |||
@Override | |||
public Component next() { | |||
if (!hasNext()) { | |||
return null; | |||
@@ -88,7 +84,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
return null; | |||
} | |||
@Override | |||
public void remove() { | |||
if (i == 1) { | |||
if (getFirstComponent() != null) { | |||
@@ -110,6 +105,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
* @param c | |||
* the component to be added. | |||
*/ | |||
@Override | |||
public void addComponent(Component c) { | |||
if (getFirstComponent() == null) { | |||
@@ -197,6 +193,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
* @param c | |||
* the component to be removed. | |||
*/ | |||
@Override | |||
public void removeComponent(Component c) { | |||
super.removeComponent(c); | |||
@@ -213,7 +210,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
* | |||
* @see com.vaadin.ui.ComponentContainer#getComponentIterator() | |||
*/ | |||
@Override | |||
public Iterator<Component> getComponentIterator() { | |||
return new ComponentIterator(); | |||
} | |||
@@ -224,7 +221,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
* | |||
* @return the number of contained components (zero, one or two) | |||
*/ | |||
@Override | |||
public int getComponentCount() { | |||
int count = 0; | |||
if (getFirstComponent() != null) { | |||
@@ -237,7 +234,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { | |||
} | |||
/* Documented in superclass */ | |||
@Override | |||
public void replaceComponent(Component oldComponent, Component newComponent) { | |||
if (oldComponent == getFirstComponent()) { | |||
setFirstComponent(newComponent); |
@@ -38,12 +38,11 @@ public class Button extends AbstractComponent implements | |||
Action.ShortcutNotifier { | |||
private ButtonServerRpc rpc = new ButtonServerRpc() { | |||
@Override | |||
public void click(MouseEventDetails mouseEventDetails) { | |||
fireClick(mouseEventDetails); | |||
} | |||
@Override | |||
public void disableOnClick() { | |||
// Could be optimized so the button is not repainted because of | |||
// this (client side has already disabled the button) | |||
@@ -52,6 +51,7 @@ public class Button extends AbstractComponent implements | |||
}; | |||
FocusAndBlurServerRpcImpl focusBlurRpc = new FocusAndBlurServerRpcImpl(this) { | |||
@Override | |||
protected void fireEvent(Event event) { | |||
Button.this.fireEvent(event); | |||
@@ -332,24 +332,20 @@ public class Button extends AbstractComponent implements | |||
fireEvent(new Button.ClickEvent(this, details)); | |||
} | |||
@Override | |||
public void addListener(BlurListener listener) { | |||
addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener, | |||
BlurListener.blurMethod); | |||
} | |||
@Override | |||
public void removeListener(BlurListener listener) { | |||
removeListener(BlurEvent.EVENT_ID, BlurEvent.class, listener); | |||
} | |||
@Override | |||
public void addListener(FocusListener listener) { | |||
addListener(FocusEvent.EVENT_ID, FocusEvent.class, listener, | |||
FocusListener.focusMethod); | |||
} | |||
@Override | |||
public void removeListener(FocusListener listener) { | |||
removeListener(FocusEvent.EVENT_ID, FocusEvent.class, listener); | |||
@@ -475,12 +471,10 @@ public class Button extends AbstractComponent implements | |||
requestRepaint(); | |||
} | |||
@Override | |||
public int getTabIndex() { | |||
return tabIndex; | |||
} | |||
@Override | |||
public void setTabIndex(int tabIndex) { | |||
this.tabIndex = tabIndex; | |||
@@ -108,7 +108,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
setWidth(100, UNITS_PERCENTAGE); | |||
setImmediate(true); | |||
setCloseHandler(new CloseHandler() { | |||
@Override | |||
public void onTabClose(TabSheet tabsheet, Component c) { | |||
tabsheet.removeComponent(c); | |||
} | |||
@@ -121,7 +121,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
* | |||
* @return the unmodifiable Iterator of the tab content components | |||
*/ | |||
@Override | |||
public Iterator<Component> getComponentIterator() { | |||
return Collections.unmodifiableList(components).iterator(); | |||
} | |||
@@ -132,7 +132,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
* | |||
* @return the number of contained components | |||
*/ | |||
@Override | |||
public int getComponentCount() { | |||
return components.size(); | |||
} | |||
@@ -146,6 +146,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
* @param c | |||
* the component to be removed. | |||
*/ | |||
@Override | |||
public void removeComponent(Component c) { | |||
if (c != null && components.contains(c)) { | |||
@@ -196,6 +197,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
* @param c | |||
* the component to be added. | |||
*/ | |||
@Override | |||
public void addComponent(Component c) { | |||
addTab(c); | |||
@@ -337,6 +339,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
* @param source | |||
* the container components are removed from. | |||
*/ | |||
@Override | |||
public void moveComponentsFrom(ComponentContainer source) { | |||
for (final Iterator<Component> i = source.getComponentIterator(); i | |||
@@ -362,7 +365,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
* @throws PaintException | |||
* if the paint operation failed. | |||
*/ | |||
@Override | |||
public void paintContent(PaintTarget target) throws PaintException { | |||
if (areTabsHidden()) { | |||
@@ -687,7 +690,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
} | |||
// inherits javadoc | |||
@Override | |||
public void changeVariables(Object source, Map<String, Object> variables) { | |||
if (variables.containsKey("selected")) { | |||
setSelectedTab(keyMapper.get((String) variables.get("selected"))); | |||
@@ -724,7 +727,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
* | |||
* {@inheritDoc} | |||
*/ | |||
@Override | |||
public void replaceComponent(Component oldComponent, Component newComponent) { | |||
if (selected == oldComponent) { | |||
@@ -1079,34 +1082,29 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
/** | |||
* Returns the tab caption. Can never be null. | |||
*/ | |||
@Override | |||
public String getCaption() { | |||
return caption; | |||
} | |||
@Override | |||
public void setCaption(String caption) { | |||
this.caption = caption; | |||
requestRepaint(); | |||
} | |||
@Override | |||
public Resource getIcon() { | |||
return icon; | |||
} | |||
@Override | |||
public void setIcon(Resource icon) { | |||
this.icon = icon; | |||
requestRepaint(); | |||
} | |||
@Override | |||
public boolean isEnabled() { | |||
return enabled; | |||
} | |||
@Override | |||
public void setEnabled(boolean enabled) { | |||
this.enabled = enabled; | |||
if (updateSelection()) { | |||
@@ -1115,12 +1113,10 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
requestRepaint(); | |||
} | |||
@Override | |||
public boolean isVisible() { | |||
return visible; | |||
} | |||
@Override | |||
public void setVisible(boolean visible) { | |||
this.visible = visible; | |||
if (updateSelection()) { | |||
@@ -1129,12 +1125,10 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
requestRepaint(); | |||
} | |||
@Override | |||
public boolean isClosable() { | |||
return closable; | |||
} | |||
@Override | |||
public void setClosable(boolean closable) { | |||
this.closable = closable; | |||
requestRepaint(); | |||
@@ -1144,29 +1138,24 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
} | |||
@Override | |||
public String getDescription() { | |||
return description; | |||
} | |||
@Override | |||
public void setDescription(String description) { | |||
this.description = description; | |||
requestRepaint(); | |||
} | |||
@Override | |||
public ErrorMessage getComponentError() { | |||
return componentError; | |||
} | |||
@Override | |||
public void setComponentError(ErrorMessage componentError) { | |||
this.componentError = componentError; | |||
requestRepaint(); | |||
} | |||
@Override | |||
public Component getComponent() { | |||
for (Map.Entry<Component, Tab> entry : tabs.entrySet()) { | |||
if (entry.getValue() == this) { | |||
@@ -1176,13 +1165,11 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
return null; | |||
} | |||
@Override | |||
public void setStyleName(String styleName) { | |||
this.styleName = styleName; | |||
requestRepaint(); | |||
} | |||
@Override | |||
public String getStyleName() { | |||
return styleName; | |||
} | |||
@@ -1258,35 +1245,29 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
super.focus(); | |||
} | |||
@Override | |||
public int getTabIndex() { | |||
return tabIndex; | |||
} | |||
@Override | |||
public void setTabIndex(int tabIndex) { | |||
this.tabIndex = tabIndex; | |||
requestRepaint(); | |||
} | |||
@Override | |||
public void addListener(BlurListener listener) { | |||
addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener, | |||
BlurListener.blurMethod); | |||
} | |||
@Override | |||
public void removeListener(BlurListener listener) { | |||
removeListener(BlurEvent.EVENT_ID, BlurEvent.class, listener); | |||
} | |||
@Override | |||
public void addListener(FocusListener listener) { | |||
addListener(FocusEvent.EVENT_ID, FocusEvent.class, listener, | |||
FocusListener.focusMethod); | |||
} | |||
@Override | |||
public void removeListener(FocusListener listener) { | |||
removeListener(FocusEvent.EVENT_ID, FocusEvent.class, listener); | |||
@@ -1647,6 +1647,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* this method has been called. See {@link #refreshRowCache()} for forcing | |||
* an update of the contents. | |||
*/ | |||
@Override | |||
public void requestRepaint() { | |||
// Overridden only for javadoc | |||
@@ -2504,6 +2505,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* @see com.vaadin.ui.Select#changeVariables(java.lang.Object, | |||
* java.util.Map) | |||
*/ | |||
@Override | |||
public void changeVariables(Object source, Map<String, Object> variables) { | |||
@@ -2826,6 +2828,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* @see com.vaadin.ui.AbstractSelect#paintContent(com.vaadin. | |||
* terminal.PaintTarget) | |||
*/ | |||
@Override | |||
public void paintContent(PaintTarget target) throws PaintException { | |||
/* | |||
@@ -3684,7 +3687,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.event.Action.Container#addActionHandler(Action.Handler) | |||
*/ | |||
@Override | |||
public void addActionHandler(Action.Handler actionHandler) { | |||
if (actionHandler != null) { | |||
@@ -3711,7 +3714,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.event.Action.Container#removeActionHandler(Action.Handler) | |||
*/ | |||
@Override | |||
public void removeActionHandler(Action.Handler actionHandler) { | |||
if (actionHandlers != null && actionHandlers.contains(actionHandler)) { | |||
@@ -3751,6 +3754,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Property.ValueChangeListener#valueChange(Property.ValueChangeEvent) | |||
*/ | |||
@Override | |||
public void valueChange(Property.ValueChangeEvent event) { | |||
if (event.getProperty() == this | |||
@@ -3781,6 +3785,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.ui.Component#attach() | |||
*/ | |||
@Override | |||
public void attach() { | |||
super.attach(); | |||
@@ -3793,6 +3798,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.ui.Component#detach() | |||
*/ | |||
@Override | |||
public void detach() { | |||
super.detach(); | |||
@@ -3803,6 +3809,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container#removeAllItems() | |||
*/ | |||
@Override | |||
public boolean removeAllItems() { | |||
currentPageFirstItemId = null; | |||
@@ -3815,6 +3822,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container#removeItem(Object) | |||
*/ | |||
@Override | |||
public boolean removeItem(Object itemId) { | |||
final Object nextItemId = nextItemId(itemId); | |||
@@ -3833,6 +3841,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container#removeContainerProperty(Object) | |||
*/ | |||
@Override | |||
public boolean removeContainerProperty(Object propertyId) | |||
throws UnsupportedOperationException { | |||
@@ -3859,6 +3868,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* @see com.vaadin.data.Container#addContainerProperty(Object, Class, | |||
* Object) | |||
*/ | |||
@Override | |||
public boolean addContainerProperty(Object propertyId, Class<?> type, | |||
Object defaultValue) throws UnsupportedOperationException { | |||
@@ -4014,6 +4024,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.ui.Select#getVisibleItemIds() | |||
*/ | |||
@Override | |||
public Collection<?> getVisibleItemIds() { | |||
@@ -4037,6 +4048,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.ItemSetChangeListener#containerItemSetChange(com.vaadin.data.Container.ItemSetChangeEvent) | |||
*/ | |||
@Override | |||
public void containerItemSetChange(Container.ItemSetChangeEvent event) { | |||
super.containerItemSetChange(event); | |||
@@ -4053,6 +4065,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.PropertySetChangeListener#containerPropertySetChange(com.vaadin.data.Container.PropertySetChangeEvent) | |||
*/ | |||
@Override | |||
public void containerPropertySetChange( | |||
Container.PropertySetChangeEvent event) { | |||
@@ -4096,6 +4109,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* if set to true. | |||
* @see com.vaadin.ui.Select#setNewItemsAllowed(boolean) | |||
*/ | |||
@Override | |||
public void setNewItemsAllowed(boolean allowNewOptions) | |||
throws UnsupportedOperationException { | |||
@@ -4109,7 +4123,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#nextItemId(java.lang.Object) | |||
*/ | |||
@Override | |||
public Object nextItemId(Object itemId) { | |||
return ((Container.Ordered) items).nextItemId(itemId); | |||
} | |||
@@ -4120,7 +4134,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#prevItemId(java.lang.Object) | |||
*/ | |||
@Override | |||
public Object prevItemId(Object itemId) { | |||
return ((Container.Ordered) items).prevItemId(itemId); | |||
} | |||
@@ -4130,7 +4144,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#firstItemId() | |||
*/ | |||
@Override | |||
public Object firstItemId() { | |||
return ((Container.Ordered) items).firstItemId(); | |||
} | |||
@@ -4140,7 +4154,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#lastItemId() | |||
*/ | |||
@Override | |||
public Object lastItemId() { | |||
return ((Container.Ordered) items).lastItemId(); | |||
} | |||
@@ -4151,7 +4165,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#isFirstId(java.lang.Object) | |||
*/ | |||
@Override | |||
public boolean isFirstId(Object itemId) { | |||
return ((Container.Ordered) items).isFirstId(itemId); | |||
} | |||
@@ -4162,7 +4176,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#isLastId(java.lang.Object) | |||
*/ | |||
@Override | |||
public boolean isLastId(Object itemId) { | |||
return ((Container.Ordered) items).isLastId(itemId); | |||
} | |||
@@ -4172,7 +4186,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object) | |||
*/ | |||
@Override | |||
public Object addItemAfter(Object previousItemId) | |||
throws UnsupportedOperationException { | |||
Object itemId = ((Container.Ordered) items) | |||
@@ -4189,7 +4203,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object, | |||
* java.lang.Object) | |||
*/ | |||
@Override | |||
public Item addItemAfter(Object previousItemId, Object newItemId) | |||
throws UnsupportedOperationException { | |||
Item item = ((Container.Ordered) items).addItemAfter(previousItemId, | |||
@@ -4282,7 +4296,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* boolean[]) | |||
* | |||
*/ | |||
@Override | |||
public void sort(Object[] propertyId, boolean[] ascending) | |||
throws UnsupportedOperationException { | |||
final Container c = getContainerDataSource(); | |||
@@ -4318,7 +4332,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* | |||
* @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds() | |||
*/ | |||
@Override | |||
public Collection<?> getSortableContainerPropertyIds() { | |||
final Container c = getContainerDataSource(); | |||
if (c instanceof Container.Sortable && !isSortDisabled()) { | |||
@@ -4508,19 +4522,18 @@ public class Table extends AbstractSelect implements Action.Container, | |||
public abstract String getStyle(Object itemId, Object propertyId); | |||
} | |||
@Override | |||
public void addListener(ItemClickListener listener) { | |||
addListener(VScrollTable.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, | |||
listener, ItemClickEvent.ITEM_CLICK_METHOD); | |||
} | |||
@Override | |||
public void removeListener(ItemClickListener listener) { | |||
removeListener(VScrollTable.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, | |||
listener); | |||
} | |||
// Identical to AbstractCompoenentContainer.setEnabled(); | |||
@Override | |||
public void setEnabled(boolean enabled) { | |||
super.setEnabled(enabled); | |||
@@ -4590,13 +4603,11 @@ public class Table extends AbstractSelect implements Action.Container, | |||
} | |||
@Override | |||
public TableTransferable getTransferable(Map<String, Object> rawVariables) { | |||
TableTransferable transferable = new TableTransferable(rawVariables); | |||
return transferable; | |||
} | |||
@Override | |||
public DropHandler getDropHandler() { | |||
return dropHandler; | |||
} | |||
@@ -4605,7 +4616,6 @@ public class Table extends AbstractSelect implements Action.Container, | |||
this.dropHandler = dropHandler; | |||
} | |||
@Override | |||
public AbstractSelectTargetDetails translateDropTargetDetails( | |||
Map<String, Object> clientVariables) { | |||
return new AbstractSelectTargetDetails(clientVariables); | |||
@@ -4662,6 +4672,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* com.vaadin.event.dd.acceptcriteria.ServerSideCriterion#getIdentifier | |||
* () | |||
*/ | |||
@Override | |||
protected String getIdentifier() { | |||
return TableDropCriterion.class.getCanonicalName(); | |||
@@ -4674,7 +4685,6 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* com.vaadin.event.dd.acceptcriteria.AcceptCriterion#accepts(com.vaadin | |||
* .event.dd.DragAndDropEvent) | |||
*/ | |||
@Override | |||
@SuppressWarnings("unchecked") | |||
public boolean accept(DragAndDropEvent dragEvent) { | |||
AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent | |||
@@ -4694,6 +4704,7 @@ public class Table extends AbstractSelect implements Action.Container, | |||
* com.vaadin.event.dd.acceptcriteria.AcceptCriterion#paintResponse( | |||
* com.vaadin.terminal.PaintTarget) | |||
*/ | |||
@Override | |||
public void paintResponse(PaintTarget target) throws PaintException { | |||
/* | |||
@@ -5349,12 +5360,10 @@ public class Table extends AbstractSelect implements Action.Container, | |||
super.setVisible(visible); | |||
} | |||
@Override | |||
public Iterator<Component> iterator() { | |||
return getComponentIterator(); | |||
} | |||
@Override | |||
public Iterator<Component> getComponentIterator() { | |||
if (visibleComponents == null) { | |||
Collection<Component> empty = Collections.emptyList(); | |||
@@ -5364,7 +5373,6 @@ public class Table extends AbstractSelect implements Action.Container, | |||
return visibleComponents.iterator(); | |||
} | |||
@Override | |||
public boolean isComponentVisible(Component childComponent) { | |||
return true; | |||
} |
@@ -81,7 +81,7 @@ public class TreeTable extends Table implements Hierarchical { | |||
* Consider adding getDepth to {@link Collapsible}, might help | |||
* scalability with some container implementations. | |||
*/ | |||
@Override | |||
public int getDepth(Object itemId) { | |||
int depth = 0; | |||
Hierarchical hierarchicalContainer = getContainerDataSource(); | |||
@@ -92,7 +92,6 @@ public class TreeTable extends Table implements Hierarchical { | |||
return depth; | |||
} | |||
@Override | |||
public void containerItemSetChange(ItemSetChangeEvent event) { | |||
} | |||
@@ -111,54 +110,44 @@ public class TreeTable extends Table implements Hierarchical { | |||
return (Collapsible) getContainerDataSource(); | |||
} | |||
@Override | |||
public void toggleChildVisibility(Object itemId) { | |||
c().setCollapsed(itemId, !c().isCollapsed(itemId)); | |||
} | |||
@Override | |||
public boolean isNodeOpen(Object itemId) { | |||
return !c().isCollapsed(itemId); | |||
} | |||
@Override | |||
public int size() { | |||
return TreeTable.super.size(); | |||
} | |||
@Override | |||
public Object getIdByIndex(int index) { | |||
return TreeTable.super.getIdByIndex(index); | |||
} | |||
@Override | |||
public int indexOfId(Object id) { | |||
return TreeTable.super.indexOfId(id); | |||
} | |||
@Override | |||
public boolean isLastId(Object itemId) { | |||
// using the default impl | |||
return TreeTable.super.isLastId(itemId); | |||
} | |||
@Override | |||
public Object lastItemId() { | |||
// using the default impl | |||
return TreeTable.super.lastItemId(); | |||
} | |||
@Override | |||
public Object nextItemId(Object itemId) { | |||
return TreeTable.super.nextItemId(itemId); | |||
} | |||
@Override | |||
public Object prevItemId(Object itemId) { | |||
return TreeTable.super.prevItemId(itemId); | |||
} | |||
@Override | |||
public Collection<?> getItemIds() { | |||
return TreeTable.super.getItemIds(); | |||
} | |||
@@ -176,22 +165,18 @@ public class TreeTable extends Table implements Hierarchical { | |||
private final HashSet<Object> openItems = new HashSet<Object>(); | |||
@Override | |||
public boolean isNodeOpen(Object itemId) { | |||
return openItems.contains(itemId); | |||
} | |||
@Override | |||
public int size() { | |||
return getPreOrder().size(); | |||
} | |||
@Override | |||
public Collection<Object> getItemIds() { | |||
return Collections.unmodifiableCollection(getPreOrder()); | |||
} | |||
@Override | |||
public boolean isLastId(Object itemId) { | |||
if (itemId == null) { | |||
return false; | |||
@@ -200,7 +185,6 @@ public class TreeTable extends Table implements Hierarchical { | |||
return itemId.equals(lastItemId()); | |||
} | |||
@Override | |||
public Object lastItemId() { | |||
if (getPreOrder().size() > 0) { | |||
return getPreOrder().get(getPreOrder().size() - 1); | |||
@@ -209,7 +193,6 @@ public class TreeTable extends Table implements Hierarchical { | |||
} | |||
} | |||
@Override | |||
public Object nextItemId(Object itemId) { | |||
int indexOf = getPreOrder().indexOf(itemId); | |||
if (indexOf == -1) { | |||
@@ -223,7 +206,6 @@ public class TreeTable extends Table implements Hierarchical { | |||
} | |||
} | |||
@Override | |||
public Object prevItemId(Object itemId) { | |||
int indexOf = getPreOrder().indexOf(itemId); | |||
indexOf--; | |||
@@ -234,7 +216,6 @@ public class TreeTable extends Table implements Hierarchical { | |||
} | |||
} | |||
@Override | |||
public void toggleChildVisibility(Object itemId) { | |||
boolean removed = openItems.remove(itemId); | |||
if (!removed) { | |||
@@ -284,12 +265,10 @@ public class TreeTable extends Table implements Hierarchical { | |||
} | |||
@Override | |||
public int indexOfId(Object id) { | |||
return getPreOrder().indexOf(id); | |||
} | |||
@Override | |||
public Object getIdByIndex(int index) { | |||
return getPreOrder().get(index); | |||
} | |||
@@ -631,44 +610,36 @@ public class TreeTable extends Table implements Hierarchical { | |||
return getContainerStrategy().getItemIds(); | |||
} | |||
@Override | |||
public boolean areChildrenAllowed(Object itemId) { | |||
return getContainerDataSource().areChildrenAllowed(itemId); | |||
} | |||
@Override | |||
public Collection<?> getChildren(Object itemId) { | |||
return getContainerDataSource().getChildren(itemId); | |||
} | |||
@Override | |||
public Object getParent(Object itemId) { | |||
return getContainerDataSource().getParent(itemId); | |||
} | |||
@Override | |||
public boolean hasChildren(Object itemId) { | |||
return getContainerDataSource().hasChildren(itemId); | |||
} | |||
@Override | |||
public boolean isRoot(Object itemId) { | |||
return getContainerDataSource().isRoot(itemId); | |||
} | |||
@Override | |||
public Collection<?> rootItemIds() { | |||
return getContainerDataSource().rootItemIds(); | |||
} | |||
@Override | |||
public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) | |||
throws UnsupportedOperationException { | |||
return getContainerDataSource().setChildrenAllowed(itemId, | |||
areChildrenAllowed); | |||
} | |||
@Override | |||
public boolean setParent(Object itemId, Object newParentId) | |||
throws UnsupportedOperationException { | |||
return getContainerDataSource().setParent(itemId, newParentId); |
@@ -79,7 +79,6 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
private WindowServerRpc rpc = new WindowServerRpc() { | |||
@Override | |||
public void click(MouseEventDetails mouseDetails) { | |||
fireEvent(new ClickEvent(Window.this, mouseDetails)); | |||
} | |||
@@ -125,6 +124,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
* | |||
* @see com.vaadin.ui.Panel#addComponent(com.vaadin.ui.Component) | |||
*/ | |||
@Override | |||
public void addComponent(Component c) { | |||
if (c instanceof Window) { | |||
@@ -142,6 +142,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
* | |||
* @see com.vaadin.ui.Panel#paintContent(com.vaadin.terminal.PaintTarget) | |||
*/ | |||
@Override | |||
public synchronized void paintContent(PaintTarget target) | |||
throws PaintException { | |||
@@ -159,6 +160,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
* | |||
* @see com.vaadin.ui.Panel#changeVariables(java.lang.Object, java.util.Map) | |||
*/ | |||
@Override | |||
public void changeVariables(Object source, Map<String, Object> variables) { | |||
@@ -624,8 +626,13 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
} | |||
/** | |||
* Request to center this window on the screen. <b>Note:</b> affects | |||
* sub-windows only. | |||
* Sets this window to be centered relative to its parent window. Affects | |||
* sub-windows only. If the window is resized as a result of the size of its | |||
* content changing, it will keep itself centered as long as its position is | |||
* not explicitly changed programmatically or by the user. | |||
* <p> | |||
* <b>NOTE:</b> This method has several issues as currently implemented. | |||
* Please refer to http://dev.vaadin.com/ticket/8971 for details. | |||
*/ | |||
public void center() { | |||
getState().setCentered(true); | |||
@@ -808,13 +815,12 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
* | |||
* @see com.vaadin.event.FieldEvents.FocusNotifier#addListener(com.vaadin.event.FieldEvents.FocusListener) | |||
*/ | |||
@Override | |||
public void addListener(FocusListener listener) { | |||
addListener(FocusEvent.EVENT_ID, FocusEvent.class, listener, | |||
FocusListener.focusMethod); | |||
} | |||
@Override | |||
public void removeListener(FocusListener listener) { | |||
removeListener(FocusEvent.EVENT_ID, FocusEvent.class, listener); | |||
} | |||
@@ -826,13 +832,12 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
* | |||
* @see com.vaadin.event.FieldEvents.BlurNotifier#addListener(com.vaadin.event.FieldEvents.BlurListener) | |||
*/ | |||
@Override | |||
public void addListener(BlurListener listener) { | |||
addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener, | |||
BlurListener.blurMethod); | |||
} | |||
@Override | |||
public void removeListener(BlurListener listener) { | |||
removeListener(BlurEvent.EVENT_ID, BlurEvent.class, listener); | |||
} | |||
@@ -843,6 +848,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
* If the window is a sub-window focusing will cause the sub-window to be | |||
* brought on top of other sub-windows on gain keyboard focus. | |||
*/ | |||
@Override | |||
public void focus() { | |||
/* | |||
@@ -858,36 +864,4 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, | |||
public WindowState getState() { | |||
return (WindowState) super.getState(); | |||
} | |||
/** | |||
* Gets the height of the viewport area of the browser window where this | |||
* window is displayed. | |||
* | |||
* @return the browser viewport height in pixels | |||
*/ | |||
public int getBrowserWindowHeight() { | |||
// Size only reported by VView -> data only available from application | |||
// level window | |||
if (getParent() != null) { | |||
return ((Root) getParent()).getBrowserWindowHeight(); | |||
} | |||
return browserWindowHeight; | |||
} | |||
/** | |||
* Gets the width of the viewport area of the browser window where this | |||
* window is displayed. | |||
* | |||
* @return the browser viewport width in pixels | |||
*/ | |||
public int getBrowserWindowWidth() { | |||
// Size only reported by VView -> data only available from application | |||
// level window | |||
if (getParent() != null) { | |||
return ((Root) getParent()).getBrowserWindowWidth(); | |||
} | |||
return browserWindowWidth; | |||
} | |||
} |
@@ -5,7 +5,7 @@ package com.vaadin.ui.themes; | |||
public class ChameleonTheme extends BaseTheme { | |||
public static final String THEME_NAME = "Chameleon"; | |||
public static final String THEME_NAME = "chameleon"; | |||
/*************************************************************************** | |||
* Label styles |
@@ -15,8 +15,6 @@ import java.util.Enumeration; | |||
import java.util.List; | |||
import java.util.jar.JarEntry; | |||
import org.junit.Test; | |||
import com.vaadin.Application; | |||
import com.vaadin.ui.Component; | |||
import com.vaadin.ui.ComponentContainer; | |||
@@ -29,6 +27,9 @@ import com.vaadin.ui.PopupView; | |||
import com.vaadin.ui.Root; | |||
import com.vaadin.ui.VerticalSplitPanel; | |||
import com.vaadin.ui.Window; | |||
import com.vaadin.ui.themes.BaseTheme; | |||
import org.junit.Test; | |||
@SuppressWarnings("deprecation") | |||
public class VaadinClasses { | |||
@@ -71,6 +72,15 @@ public class VaadinClasses { | |||
} | |||
} | |||
public static List<Class<? extends BaseTheme>> getThemeClasses() { | |||
try { | |||
return findClasses(BaseTheme.class, "com.vaadin.ui.themes"); | |||
} catch (IOException e) { | |||
e.printStackTrace(); | |||
return null; | |||
} | |||
} | |||
public static List<Class<? extends Object>> getAllServerSideClasses() { | |||
try { | |||
return findClassesNoTests(Object.class, "com.vaadin", new String[] { |
@@ -0,0 +1,38 @@ | |||
package com.vaadin.tests.server; | |||
import java.io.File; | |||
import java.lang.reflect.Field; | |||
import java.util.List; | |||
import junit.framework.TestCase; | |||
import com.vaadin.tests.VaadinClasses; | |||
import com.vaadin.ui.themes.BaseTheme; | |||
public class TestThemeNames extends TestCase { | |||
public void testThemeNames() { | |||
File baseDir = new File(SourceFileChecker.getBaseDir() | |||
+ "WebContent/VAADIN/themes/"); | |||
List<Class<? extends BaseTheme>> themeClasses = VaadinClasses | |||
.getThemeClasses(); | |||
for (Class<? extends BaseTheme> themeClass : themeClasses) { | |||
try { | |||
Field field = themeClass.getField("THEME_NAME"); | |||
String themeName = (String) field.get(null); | |||
File themeDir = new File(baseDir, themeName); | |||
File styleFile = new File(themeDir, "styles.css"); | |||
assertTrue("Can't find " + styleFile + " for theme " | |||
+ themeClass.getName(), styleFile.exists()); | |||
// Test that casing matches | |||
assertEquals(themeDir.getCanonicalFile().getName(), themeName); | |||
} catch (Exception e) { | |||
throw new RuntimeException(e); | |||
} | |||
} | |||
} | |||
} |
@@ -15,7 +15,7 @@ public class TerminalErrorNotification extends TestBase { | |||
protected void setup() { | |||
Button button = new Button("Throw exception", | |||
new Button.ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
throw new RuntimeException("You asked for it"); | |||
} |
@@ -0,0 +1,62 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |||
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |||
<link rel="selenium.base" href="" /> | |||
<title>DragStartModes</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">DragStartModes</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.draganddropwrapper.DragStartModes?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>drag</td> | |||
<td>vaadin=runcomvaadintestscomponentsdraganddropwrapperDragStartModes::PID_SlabelCOMPONENT</td> | |||
<td>50,10</td> | |||
</tr> | |||
<tr> | |||
<td>mouseMoveAt</td> | |||
<td>vaadin=runcomvaadintestscomponentsdraganddropwrapperDragStartModes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VLabel[0]</td> | |||
<td>50,10</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>drag-mode-component</td> | |||
</tr> | |||
<tr> | |||
<td>drop</td> | |||
<td>vaadin=runcomvaadintestscomponentsdraganddropwrapperDragStartModes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VLabel[0]</td> | |||
<td>50,10</td> | |||
</tr> | |||
<tr> | |||
<td>drag</td> | |||
<td>vaadin=runcomvaadintestscomponentsdraganddropwrapperDragStartModes::PID_SlabelWRAPPER</td> | |||
<td>50,10</td> | |||
</tr> | |||
<tr> | |||
<td>mouseMoveAt</td> | |||
<td>vaadin=runcomvaadintestscomponentsdraganddropwrapperDragStartModes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VLabel[0]</td> | |||
<td>50,10</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>drag-mode-wrapper</td> | |||
</tr> | |||
<tr> | |||
<td>drop</td> | |||
<td>vaadin=runcomvaadintestscomponentsdraganddropwrapperDragStartModes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VLabel[0]</td> | |||
<td>50,10</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -0,0 +1,46 @@ | |||
package com.vaadin.tests.components.draganddropwrapper; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.tests.util.TestUtils; | |||
import com.vaadin.ui.Component; | |||
import com.vaadin.ui.DragAndDropWrapper; | |||
import com.vaadin.ui.DragAndDropWrapper.DragStartMode; | |||
import com.vaadin.ui.Label; | |||
public class DragStartModes extends TestBase { | |||
@Override | |||
protected void setup() { | |||
TestUtils.injectCSS(getMainWindow(), | |||
".v-ddwrapper { background: #ACF; }"); | |||
addComponent(makeWrapper(DragStartMode.NONE)); | |||
addComponent(makeWrapper(DragStartMode.COMPONENT)); | |||
addComponent(makeWrapper(DragStartMode.WRAPPER)); | |||
addComponent(makeWrapper(DragStartMode.HTML5)); | |||
addComponent(new Label("Drop here")); | |||
} | |||
private Component makeWrapper(DragStartMode mode) { | |||
Label label = new Label("Drag start mode: " + mode); | |||
label.setDebugId("label" + mode); | |||
DragAndDropWrapper wrapper = new DragAndDropWrapper(label); | |||
wrapper.setHTML5DataFlavor("Text", "HTML5!"); | |||
wrapper.setDragStartMode(mode); | |||
wrapper.setWidth("200px"); | |||
return wrapper; | |||
} | |||
@Override | |||
protected String getDescription() { | |||
return "Different drag start modes should show correct drag images"; | |||
} | |||
@Override | |||
protected Integer getTicketNumber() { | |||
return 8949; | |||
} | |||
} |
@@ -0,0 +1,37 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |||
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |||
<link rel="selenium.base" href="" /> | |||
<title>TooltipHandlingWhenNotDefined</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">TooltipHandlingWhenNotDefined</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.draganddropwrapper.TooltipHandlingWhenNotDefined?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseOver</td> | |||
<td>vaadin=runcomvaadintestscomponentsdraganddropwrapperTooltipHandlingWhenNotDefined::PID_StooltipLabel</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>pause</td> | |||
<td></td> | |||
<td>3000</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>tooltip-shown</td> | |||
</tr> | |||
</tbody> | |||
</table> | |||
</body> | |||
</html> |
@@ -0,0 +1,41 @@ | |||
package com.vaadin.tests.components.draganddropwrapper; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.ui.CssLayout; | |||
import com.vaadin.ui.DragAndDropWrapper; | |||
import com.vaadin.ui.DragAndDropWrapper.DragStartMode; | |||
import com.vaadin.ui.Label; | |||
public class TooltipHandlingWhenNotDefined extends TestBase { | |||
@Override | |||
protected void setup() { | |||
CssLayout wrapperLayout = new CssLayout(); | |||
wrapperLayout.setWidth("100%"); | |||
Label label = new Label("Can I has the tooltip?", Label.CONTENT_XHTML); | |||
label.setDebugId("tooltipLabel"); | |||
label.setDescription("Good! Tooltip works!"); | |||
label.setSizeUndefined(); | |||
wrapperLayout.addComponent(label); | |||
DragAndDropWrapper wrapper = new DragAndDropWrapper(wrapperLayout); | |||
wrapper.setWidth("100%"); | |||
wrapper.setDragStartMode(DragStartMode.WRAPPER); | |||
addComponent(wrapper); | |||
} | |||
@Override | |||
protected String getDescription() { | |||
return "Wrapper most not prevent child from showing tooltip"; | |||
} | |||
@Override | |||
protected Integer getTicketNumber() { | |||
return 7766; | |||
} | |||
} |
@@ -17,15 +17,11 @@ public class NotificationsAndModalWindow extends TestBase { | |||
Button b = new Button("Button"); | |||
b.addListener(new Button.ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
Window w = new Window("This is a window"); | |||
w.setModal(true); | |||
getMainWindow().addWindow(w); | |||
} | |||
}); | |||
addComponent(b); | |||
} |
@@ -46,7 +46,7 @@ public class ScrollDetachSynchronization extends TestBase { | |||
mainLayout.setExpandRatio(firstLayout, 1); | |||
first.addListener(new Button.ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
if (mainLayout.getComponent(1).equals(secondLayout)) { | |||
mainLayout.replaceComponent(secondLayout, firstLayout); | |||
@@ -55,7 +55,7 @@ public class ScrollDetachSynchronization extends TestBase { | |||
} | |||
}); | |||
second.addListener(new Button.ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
if (mainLayout.getComponent(1).equals(firstLayout)) { | |||
mainLayout.replaceComponent(firstLayout, secondLayout); |
@@ -60,7 +60,7 @@ public class TableClickValueChangeInteraction extends TestBase { | |||
table.setHeight("100px"); | |||
if (listenClicks) { | |||
table.addListener(new ItemClickListener() { | |||
@Override | |||
public void itemClick(ItemClickEvent event) { | |||
table.requestRepaint(); | |||
clickLabel.setValue("Click " + event.getItemId()); | |||
@@ -69,7 +69,7 @@ public class TableClickValueChangeInteraction extends TestBase { | |||
} | |||
if (listenValueChanges) { | |||
table.addListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
valueChangeLabel.setValue("Value " | |||
+ event.getProperty().getValue()); |
@@ -0,0 +1,57 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |||
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |||
<link rel="selenium.base" href="" /> | |||
<title>UndefinedHeightSubWindowAndContent</title> | |||
</head> | |||
<body> | |||
<table cellpadding="1" cellspacing="1" border="1"> | |||
<thead> | |||
<tr><td rowspan="1" colspan="3">UndefinedHeightSubWindowAndContent</td></tr> | |||
</thead><tbody> | |||
<tr> | |||
<td>open</td> | |||
<td>/run/com.vaadin.tests.components.window.UndefinedHeightSubWindowAndContent?restartApplication</td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>mouseClick</td> | |||
<td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> | |||
<td>52,11</td> | |||
</tr> | |||
<tr> | |||
<td>enterCharacter</td> | |||
<td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> | |||
<td>invalid</td> | |||
</tr> | |||
<tr> | |||
<td>pressSpecialKey</td> | |||
<td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> | |||
<td>enter</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>form_full_width_1_error</td> | |||
</tr> | |||
<tr> | |||
<td>enterCharacter</td> | |||
<td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> | |||
<td>valid</td> | |||
</tr> | |||
<tr> | |||
<td>pressSpecialKey</td> | |||
<td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> | |||
<td>enter</td> | |||
</tr> | |||
<tr> | |||
<td>screenCapture</td> | |||
<td></td> | |||
<td>form_full_width_2_valid</td> | |||
</tr> | |||
</tbody></table> | |||
</body> | |||
</html> |
@@ -0,0 +1,58 @@ | |||
package com.vaadin.tests.components.window; | |||
import com.vaadin.data.Validator; | |||
import com.vaadin.tests.components.TestBase; | |||
import com.vaadin.ui.Form; | |||
import com.vaadin.ui.TextField; | |||
import com.vaadin.ui.VerticalLayout; | |||
import com.vaadin.ui.Window; | |||
public class UndefinedHeightSubWindowAndContent extends TestBase { | |||
@Override | |||
protected void setup() { | |||
Window subWindow = new Window("No scrollbars!"); | |||
subWindow.setWidth("300px"); | |||
subWindow.center(); | |||
subWindow.setModal(true); | |||
VerticalLayout layout = new VerticalLayout(); | |||
layout.setWidth("100%"); | |||
subWindow.setContent(layout); | |||
final Form form = new Form(); | |||
form.setImmediate(true); | |||
form.setValidationVisible(true); | |||
form.setCaption("This is a form"); | |||
form.setDescription("How do you do?"); | |||
final TextField field1 = new TextField("Write here"); | |||
field1.setImmediate(true); | |||
field1.addValidator(new Validator() { | |||
public void validate(Object value) throws InvalidValueException { | |||
if (!isValid(value)) { | |||
throw new InvalidValueException("FAIL!"); | |||
} | |||
} | |||
public boolean isValid(Object value) { | |||
return field1.getValue().equals("valid"); | |||
} | |||
}); | |||
form.addField("Field 1", field1); | |||
layout.addComponent(form); | |||
getMainWindow().addWindow(subWindow); | |||
subWindow.bringToFront(); | |||
} | |||
@Override | |||
protected String getDescription() { | |||
return "When both window and its content have undefined height, window must not reserve space for a scroll bar when it is not needed."; | |||
} | |||
@Override | |||
protected Integer getTicketNumber() { | |||
return 8852; | |||
} | |||
} |
@@ -22,8 +22,6 @@ public class EmbedSizeTest extends TestBase { | |||
CheckBox lazyCheckBox = new CheckBox("Lazy resize"); | |||
lazyCheckBox.addListener(new ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
CheckBox cb = (CheckBox) event.getProperty(); | |||
Boolean resizeLazy = cb.getValue(); | |||
@@ -37,7 +35,6 @@ public class EmbedSizeTest extends TestBase { | |||
addComponent(log); | |||
mainWindow.addListener(new Page.BrowserWindowResizeListener() { | |||
@Override | |||
public void browserWindowResized(BrowserWindowResizeEvent event) { | |||
log.log("Resize event: " + event.getWidth() + " x " | |||
+ event.getHeight()); |
@@ -28,7 +28,7 @@ public class GridLayoutCaptions extends TestBase { | |||
private CssLayout wrapper2 = new CssLayout(); | |||
private FormFieldFactory fff = new FormFieldFactory() { | |||
@Override | |||
public Field<?> createField(Item item, Object propertyId, | |||
Component uiContext) { | |||
@@ -194,7 +194,7 @@ public class GridLayoutCaptions extends TestBase { | |||
mainWindow.addComponent(aFormWithGl); | |||
Button b = new Button("Give me an error!", new Button.ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
aFormWithGl.createErrors(); | |||
@@ -204,7 +204,7 @@ public class GridLayoutCaptions extends TestBase { | |||
Button b2 = new Button("Get rid of an error!", | |||
new Button.ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
aFormWithGl.clearErrors(); | |||
@@ -59,7 +59,6 @@ public class GridLayoutExpandRatioModification extends TestBase implements | |||
vl2.setSizeFull(); | |||
} | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
if (isVisible) { | |||
mainLayout.setRowExpandRatio(2, 0); |
@@ -55,7 +55,6 @@ public class VerticalLayoutExpandRatioModification extends TestBase implements | |||
vl2.setSizeFull(); | |||
} | |||
@Override | |||
public void buttonClick(ClickEvent event) { | |||
if (isVisible) { | |||
mainLayout.setExpandRatio(vl2, 0); |
@@ -31,7 +31,7 @@ public class Ticket6002 extends TestBase { | |||
final TextField tf1 = new TextField( | |||
"Changing this field modifies only the textfield", property1); | |||
tf1.addListener(new Property.ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
// This value change event is called twice if the new | |||
// input value is an integer. The second time is during | |||
@@ -56,7 +56,7 @@ public class Ticket6002 extends TestBase { | |||
"Changing this field modifies the layout - do it twice", | |||
property2); | |||
tf2.addListener(new Property.ValueChangeListener() { | |||
@Override | |||
public void valueChange(ValueChangeEvent event) { | |||
// This value change event is called twice if the new | |||
// input value is an integer. The second time is during |