summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni.koivuviita@itmill.com>2009-05-08 13:48:05 +0000
committerJouni Koivuviita <jouni.koivuviita@itmill.com>2009-05-08 13:48:05 +0000
commit12fccb6e2b62c791cf976507e88558d7b6a67dc3 (patch)
treebfee3875858f925f07d4370e5e06b9616f617a23 /src/com/itmill/toolkit
parentf9698b56afb6a0a26e34c16c512946d5c5d40681 (diff)
parentf03b6c391124875a141180acce2d86f3544ecfe6 (diff)
downloadvaadin-framework-12fccb6e2b62c791cf976507e88558d7b6a67dc3.tar.gz
vaadin-framework-12fccb6e2b62c791cf976507e88558d7b6a67dc3.zip
Merge new theme branch to 6.0 branch.
svn changeset:7689/svn branch:6.0
Diffstat (limited to 'src/com/itmill/toolkit')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java15
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java3
-rw-r--r--src/com/itmill/toolkit/ui/Slider.java43
3 files changed, 35 insertions, 26 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java
index b4965d580c..b6724e4786 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java
@@ -22,6 +22,9 @@ public class IButton extends Button implements Paintable {
private String width = null;
public static final String CLASSNAME = "i-button";
+
+ // Used only for IE, because it doesn't support :active CSS selector
+ private static final String CLASSNAME_DOWN = "i-pressed";
String id;
@@ -136,13 +139,25 @@ public class IButton extends Button implements Paintable {
} else if (DOM.eventGetType(event) == Event.ONMOUSEDOWN
&& event.getButton() == Event.BUTTON_LEFT) {
clickPending = true;
+ if (BrowserInfo.get().isIE()) {
+ // Only for IE, because it doesn't support :active CSS selector
+ // Simple check is cheaper than DOM manipulation
+ addStyleName(CLASSNAME_DOWN);
+ }
} else if (DOM.eventGetType(event) == Event.ONMOUSEMOVE) {
clickPending = false;
} else if (DOM.eventGetType(event) == Event.ONMOUSEOUT) {
if (clickPending) {
click();
}
+ if (BrowserInfo.get().isIE()) {
+ removeStyleName(CLASSNAME_DOWN);
+ }
clickPending = false;
+ } else if (DOM.eventGetType(event) == Event.ONMOUSEUP) {
+ if (BrowserInfo.get().isIE()) {
+ removeStyleName(CLASSNAME_DOWN);
+ }
}
if (client != null) {
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
index ff2a986c98..89f5c01d70 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
@@ -1469,7 +1469,10 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener {
} else {
c.setSorted(false);
}
+ } else {
+ c.setSortable(false);
}
+
if (col.hasAttribute("align")) {
c.setAlign(col.getStringAttribute("align").charAt(0));
}
diff --git a/src/com/itmill/toolkit/ui/Slider.java b/src/com/itmill/toolkit/ui/Slider.java
index e47eb9a7d4..06d2264810 100644
--- a/src/com/itmill/toolkit/ui/Slider.java
+++ b/src/com/itmill/toolkit/ui/Slider.java
@@ -10,9 +10,7 @@ import com.itmill.toolkit.terminal.PaintException;
import com.itmill.toolkit.terminal.PaintTarget;
/**
- * A component for selecting a numerical value within a range. A Slider can have
- * the appearance of a scroll bar or e.g. look like an Adobe Photoshop style of
- * a slider.
+ * A component for selecting a numerical value within a range.
*
* Example code: <code>
* class MyPlayer extends CustomComponent implements ValueChangeListener {
@@ -21,19 +19,20 @@ import com.itmill.toolkit.terminal.PaintTarget;
* Slider slider;
*
* public MyPlayer() {
- * OrderedLayout ol = new OrderedLayout();
- * setCompositionRoot(ol);
+ * VerticalLayout vl = new VerticalLayout();
+ * setCompositionRoot(vl);
* slider = new Slider("Volume", 0, 100);
* slider.setImmediate(true);
- * ol.addComponent(slider);
- * ol.addComponent(volumeIndicator);
- * volumeIndicator.setValue(new Double(50));
+ * slider.setValue(new Double(50));
+ * vl.addComponent(slider);
+ * vl.addComponent(volumeIndicator);
+ * volumeIndicator.setValue("Current volume:" + 50.0);
* slider.addListener(this);
*
* }
*
* public void setVolume(double d) {
- * volumeIndicator.setValue("Current volume : " + d);
+ * volumeIndicator.setValue("Current volume: " + d);
* }
*
* public void valueChange(ValueChangeEvent event) {
@@ -59,6 +58,7 @@ public class Slider extends AbstractField {
* common slider found e.g. in Adobe Photoshop. The client side
* implementation dictates how different styles will look.
*/
+ @Deprecated
public static final String STYLE_SCROLLBAR = "scrollbar";
/** Minimum value of slider */
@@ -93,7 +93,10 @@ public class Slider extends AbstractField {
* size. Must be a value between 1-99. Other values are converted to nearest
* bound. A negative value sets the width to auto (client-side
* implementation calculates).
+ *
+ * @deprecated The size is dictated by the current theme.
*/
+ @Deprecated
private int handleSize = -1;
/**
@@ -101,6 +104,7 @@ public class Slider extends AbstractField {
* (client-side implementation decides the increment, usually somewhere
* between 5-10% of slide range).
*/
+ @Deprecated
private final boolean arrows = false;
/**
@@ -361,7 +365,9 @@ public class Slider extends AbstractField {
* Get the handle size of this Slider.
*
* @return handle size in percentages.
+ * @deprecated The size is dictated by the current theme.
*/
+ @Deprecated
public int getHandleSize() {
return handleSize;
}
@@ -371,7 +377,9 @@ public class Slider extends AbstractField {
*
* @param handleSize
* in percentages relative to slider base size.
+ * @deprecated The size is dictated by the current theme.
*/
+ @Deprecated
public void setHandleSize(int handleSize) {
if (handleSize < 0) {
this.handleSize = -1;
@@ -385,23 +393,6 @@ public class Slider extends AbstractField {
requestRepaint();
}
- /*
- * Show or hide slider arrows.
- *
- * @param visible
- *//*
- * public void setArrows(boolean visible) { arrows = visible;
- * requestRepaint(); }
- */
-
- /*
- * Does the slider have arrows?
- *
- * @return arrows visible
- *//*
- * public boolean isArrowsVisible() { return arrows; }
- */
-
@Override
public String getTag() {
return "slider";