-moz-box-sizing: border-box;\r
-ms-box-sizing: border-box;\r
box-sizing: border-box;\r
- }\r
+}\r
+\r
+.v-button.v-disabled {\r
+ cursor: default;\r
+}\r
\r
.v-ie6 .v-button {\r
display: inline;\r
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
- }
+}
+
+.v-button.v-disabled {
+ cursor: default;
+}
.v-ie6 .v-button {
display: inline;
cursor: pointer;
line-height: inherit;
}
+
+.v-button.v-button-link.v-disabled,
+.v-button.v-button-link.v-disabled .v-button-wrap {
+ cursor: default;
+ }
.v-button-link .v-button-caption,
.v-nativebutton-link .v-nativebutton-caption {
-.v-theme-version:after {content:"6_2_0_dev-20091229";}
-.v-theme-version-6_2_0_dev-20091229 {display: none;}
+.v-theme-version:after {content:"9_9_9_INTERNAL-DEBUG-BUILD";}
+.v-theme-version-9_9_9_INTERNAL-DEBUG-BUILD {display: none;}
/* Automatically compiled css file from subdirectories. */
.v-absolutelayout-wrapper {
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
- }
+}
+
+.v-button.v-disabled {
+ cursor: default;
+}
.v-ie6 .v-button {
display: inline;
cursor: pointer;
line-height: inherit;
}
+
+.v-button.v-button-link.v-disabled,
+.v-button.v-button-link.v-disabled .v-button-wrap {
+ cursor: default;
+ }
.v-button-link .v-button-caption,
.v-nativebutton-link .v-nativebutton-caption {
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
- }
+}
+
+.v-button.v-disabled {
+ cursor: default;
+}
.v-ie6 .v-button {
display: inline;
<when-property-is name="user.agent" value="ie6"/>
</replace-with>
+ <!-- Opera needs a different implementation due to GWT issue 3956 (#4099) -->
+ <replace-with class="com.google.gwt.user.client.impl.HistoryImplTimer">
+ <when-type-is class="com.google.gwt.user.client.impl.HistoryImpl" />
+ <when-property-is name="user.agent" value="opera" />
+ </replace-with>
+
<generate-with class="com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator">
<when-type-is class="com.vaadin.terminal.gwt.client.WidgetMap"/>
</generate-with>
renderRemainingComponents(pendingCells);
for (Cell cell : relativeHeighted) {
+ // rendering done above so cell.cc should not be null
Widget widget2 = cell.cc.getWidget();
client.handleComponentRelativeSize(widget2);
cell.cc.updateWidgetSize();
Cell cell = paintableToCell.get(paintable);
if (!cell.hasRelativeHeight() || !cell.hasRelativeWidth()) {
// cell sizes will only stay still if only relatively
- // sized
- // components
+ // sized components
// check if changed child affects min col widths
- cell.cc.setWidth("");
- cell.cc.setHeight("");
+ if (cell.cc != null) {
+ cell.cc.setWidth("");
+ cell.cc.setHeight("");
- cell.cc.updateWidgetSize();
+ cell.cc.updateWidgetSize();
- /*
- * If this is the result of an caption icon onload event the
- * caption size may have changed
- */
- cell.cc.updateCaptionSize();
+ /*
+ * If this is the result of an caption icon onload event the
+ * caption size may have changed
+ */
+ cell.cc.updateCaptionSize();
+ }
int width = cell.getWidth();
int allocated = columnWidths[cell.col];
}
public RenderSpace getAllocatedSpace() {
- return new RenderSpace(getAvailableWidth()
- - cc.getCaptionWidthAfterComponent(), getAvailableHeight()
- - cc.getCaptionHeightAboveComponent());
+ if (cc != null) {
+ return new RenderSpace(getAvailableWidth()
+ - cc.getCaptionWidthAfterComponent(),
+ getAvailableHeight()
+ - cc.getCaptionHeightAboveComponent());
+ } else {
+ // this should not happen normally
+ return new RenderSpace(getAvailableWidth(),
+ getAvailableHeight());
+ }
}
public boolean hasContent() {
int rowspan = 1;
UIDL childUidl;
int alignment;
+ // may be null after setUidl() if content has vanished or changed, set
+ // in render()
ChildComponentContainer cc;
public void setUidl(UIDL c) {
if (childUidl != null) {
if (c == null) {
// content has vanished, old content will be removed from
- // canvas
- // later durin render phase
+ // canvas later during the render phase
cc = null;
} else if (cc != null
&& cc.getWidget() != client.getPaintable(c)) {
// content has changed
- cc = null;
- if (widgetToComponentContainer.containsKey(client
- .getPaintable(c))) {
- // cc exist for this component (moved) use that for this
- // cell
- cc = widgetToComponentContainer.get(client
- .getPaintable(c));
+ Paintable newPaintable = client.getPaintable(c);
+ if (widgetToComponentContainer.containsKey(newPaintable)) {
+ // if a key in the map, newPaintable must be a widget
+ replaceChildComponent(cc.getWidget(),
+ (Widget) newPaintable);
+ cc = widgetToComponentContainer.get(newPaintable);
cc.setWidth("");
cc.setHeight("");
+ } else {
+ cc = null;
}
}
}
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {\r
boolean lastReadOnlyState = readonly;\r
super.updateFromUIDL(uidl, client);\r
- addStyleName(CLASSNAME + "-popupcalendar");\r
popup.setStyleName(VDateField.CLASSNAME + "-popup "\r
+ VDateField.CLASSNAME + "-"\r
+ resolutionToString(currentResolution));\r
\r
}\r
\r
+ @Override\r
+ public void setStyleName(String style) {\r
+ // make sure the style is there before size calculation\r
+ super.setStyleName(style + " " + CLASSNAME + "-popupcalendar");\r
+ }\r
+\r
public void onClick(ClickEvent event) {\r
if (event.getSource() == calendarToggle && !open && !readonly) {\r
open = true;\r
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.TreeSet;
import java.util.jar.Attributes;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
for (int i = 0; i < widgetsetNames.length; i++) {
String widgetsetname = widgetsetNames[i].trim()
.intern();
- widgetsets.put(widgetsetname, location);
+ if (!widgetsetname.equals("")) {
+ widgetsets.put(widgetsetname, location);
+ }
}
}
}
* @return URL
*/
public static URL getDefaultSourceDirectory() {
- logger.fine("classpathLocations keys: "
- + new TreeSet<URL>(classpathLocations.keySet()));
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("classpathLocations keys:");
+ ArrayList<URL> locations = new ArrayList<URL>(classpathLocations
+ .keySet());
+ for (URL location : locations) {
+ logger.fine(location.toString());
+ }
+ }
+
Iterator<String> it = rawClasspathEntries.iterator();
while (it.hasNext()) {
String entry = it.next();
currentPage = -1; // current page is always set by client
optionRequest = true;
+
+ // Hide the error indicator if needed
+ if (isRequired() && isEmpty() && getComponentError() == null
+ && getErrorMessage() != null) {
+ target.addAttribute("hideErrors", true);
+ }
}
/**
--- /dev/null
+package com.vaadin.tests.components.progressindicator;\r
+\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.ui.Button;\r
+import com.vaadin.ui.ProgressIndicator;\r
+import com.vaadin.ui.VerticalLayout;\r
+import com.vaadin.ui.Button.ClickEvent;\r
+\r
+public class ProgressIndicatorInvisible extends TestBase {\r
+\r
+ @Override\r
+ protected void setup() {\r
+ final VerticalLayout lo = new VerticalLayout();\r
+\r
+ addComponent(lo);\r
+\r
+ final ProgressIndicator pi = new ProgressIndicator();\r
+ pi.setPollingInterval(400);\r
+ lo.addComponent(pi);\r
+\r
+ final Button b = new Button("Hide container of progress indicator");\r
+ addComponent(b);\r
+\r
+ b.addListener(new Button.ClickListener() {\r
+ public void buttonClick(ClickEvent event) {\r
+ // If we skip hiding the layout, hiding the ProgressIndicator\r
+ // will stop the polling\r
+ lo.setVisible(!lo.isVisible());\r
+ // Not even this works\r
+ pi.setVisible(!lo.isVisible());\r
+ if (!lo.isVisible()) {\r
+ b.setCaption("Still polling");\r
+ } else {\r
+ b.setCaption("Hide container of progress indicator");\r
+ }\r
+\r
+ }\r
+\r
+ });\r
+ }\r
+\r
+ @Override\r
+ protected String getDescription() {\r
+ return "Progress indicator does not stop polling when its parent layout is made invisible";\r
+ }\r
+\r
+ @Override\r
+ protected Integer getTicketNumber() {\r
+ return 4014;\r
+ }\r
+\r
+}\r
--- /dev/null
+package com.vaadin.tests.layouts;\r
+\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.ui.Button;\r
+import com.vaadin.ui.GridLayout;\r
+import com.vaadin.ui.Label;\r
+import com.vaadin.ui.VerticalLayout;\r
+import com.vaadin.ui.Button.ClickEvent;\r
+\r
+public class GridLayoutNPE extends TestBase {\r
+\r
+ @Override\r
+ protected void setup() {\r
+ final VerticalLayout lo = new VerticalLayout();\r
+\r
+ final GridLayout gl = new GridLayout(2, 1);\r
+ gl.setSpacing(true);\r
+\r
+ final Label toRemove = new Label("First");\r
+ gl.addComponent(toRemove);\r
+ final Label toEdit = new Label("Second");\r
+ gl.addComponent(toEdit);\r
+\r
+ final Button b = new Button("remove 'First'");\r
+ final Button b2 = new Button("edit 'Second'");\r
+ b2.setVisible(false);\r
+\r
+ lo.addComponent(gl);\r
+ lo.addComponent(b);\r
+ lo.addComponent(b2);\r
+\r
+ b.addListener(new Button.ClickListener() {\r
+\r
+ public void buttonClick(Button.ClickEvent event) {\r
+ gl.removeComponent(toRemove);\r
+\r
+ // move another component to where the first was removed\r
+ // before rendering to the client\r
+ gl.removeComponent(toEdit);\r
+ // this could also be the result of removeAllComponents()\r
+ // followed by a loop of addComponent(c)\r
+ gl.addComponent(toEdit, 0, 0);\r
+\r
+ b.setVisible(false);\r
+ b2.setVisible(true);\r
+\r
+ }\r
+\r
+ });\r
+\r
+ b2.addListener(new Button.ClickListener() {\r
+\r
+ public void buttonClick(ClickEvent event) {\r
+ toEdit.setValue("Second (edited)");\r
+ }\r
+\r
+ });\r
+\r
+ addComponent(lo);\r
+ }\r
+\r
+ @Override\r
+ protected String getDescription() {\r
+ return "VGridLayout throws an NPE, causing client side to crash";\r
+ }\r
+\r
+ @Override\r
+ protected Integer getTicketNumber() {\r
+ return 4019;\r
+ }\r
+\r
+}\r