Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
peterblazejewicz wrote:If I succeed in my planned work I'll share some results with you guys because they will add additional value at no cost to your software features portfolio
peterblazejewicz wrote:hi Alexander,
........
They are currently not relevant to existing real browser implementation (though parts of them are within Safari ADN osx/windows builds) however they will be public with two important releases in near feature:
- Safari on OSX will be updated (soon, after they merge builds from apple and webkit)
if(!isDesignTime()){
}
private static final boolean isDesignTime(){
return false;
}
if(!isDesingTime()){
}else{
// now I can write things
}
!isDesignTime()
.myClass {
-webkit-transition-property: width;
-webkit-transition-duration: 1.0;
}
.myClass .longItem{
width: 400px;
}
public void applyTo(final Element e) {
String props = "";
String durations = "";
String functions = "";
String delays = "";
Iterator iter = items.iterator();
AnimatedItem item;
boolean hasNewValue = false;
while (iter.hasNext()) {
item = (AnimatedItem) iter.next();
props += item.getProperty();
durations += item.getDuration();
functions += item.getTimingFunction();
delays += item.getDelay();
if (iter.hasNext()) {
props += Transition.COMMA_SEPARATOR_STRING;
durations += Transition.COMMA_SEPARATOR_STRING;
functions += Transition.COMMA_SEPARATOR_STRING;
delays += Transition.COMMA_SEPARATOR_STRING;
}
if (item.getValue() != null && hasNewValue == false) {
hasNewValue = true;
}
}
DOM.setStyleAttribute(e, Transition.WEBKIT_TRANSITION_PROPERTY, props);
DOM.setStyleAttribute(e, Transition.WEBKIT_TRANSITION_DURATION,
durations);
DOM.setStyleAttribute(e, Transition.WEBKIT_TRANSITION_FUNCTION,
functions);
DOM.setStyleAttribute(e, Transition.WEBKIT_TRANSITION_DELAY, delays);
if (hasNewValue == true) {
new Timer() {
public void run() {
$applyTo(e);
}
}.schedule(1);
}
}
tr = new Transition();
tr.addItem(Transition.createItem(
Transition.WEBKIT_TRANSITION_PROPERTY_ALL, 0.5d,
Transition.TIMING_FUNCTION_EASE_IN));
tr.applyTo(myPanel);
int w = myPanel.getOffsetWidth();
myPanel.setWidth((w < 600 ? w + 100 : 0) + "px");
tr = new Transition();
tr.addItem(Transition.createItem("width", 2.5,
Transition.TIMING_FUNCTION_EASE_IN, "20px"));
tr.addItem(Transition.createItem("opacity", 2.5, "0.5"));
tr.addItem(Transition.createTransform(0.5d).translate(
"50%", "50%").rotate("-50deg"));
tr.applyTo(myPanel);
isDesignTime()
if(!isDesignTime()){
// empty block
} else {
// apply static values instead of transitions
}
peterblazejewicz wrote:I would be sufficient to have: isDesignTime() GWTD property working for Design view
if (!isDesignTime()) {
MyServiceAsync service = MyService.Util.getInstance();
// do something with MyService
}
package com.mycompany.project.client;
import com.google.gwt.user.client.ui.Label;
public class MyLabel extends Label {
private static final boolean isDesignTime() {
return false;
}
public MyLabel() {
super();
if (MyLabel.isDesignTime()) {
setText("DESIGN TIME");
}
}
}
Users browsing this forum: No registered users and 3 guests