Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync up with chart improvements, WTimeEdit improvements
- Loading branch information
Koen Deforche
committed
Feb 25, 2016
1 parent
e700619
commit 74ff9a2
Showing
75 changed files
with
5,171 additions
and
2,095 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
examples/widgetgallery/src/eu/webtoolkit/jwt/examples/widgetgallery/ChartState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2009 Emweb bvba, Leuven, Belgium. | ||
* | ||
* See the LICENSE file for terms of use. | ||
*/ | ||
package eu.webtoolkit.jwt.examples.widgetgallery; | ||
|
||
import java.util.*; | ||
import java.util.regex.*; | ||
import java.io.*; | ||
import java.lang.ref.*; | ||
import java.util.concurrent.locks.ReentrantLock; | ||
import javax.servlet.http.*; | ||
import javax.servlet.*; | ||
import eu.webtoolkit.jwt.*; | ||
import eu.webtoolkit.jwt.chart.*; | ||
import eu.webtoolkit.jwt.utils.*; | ||
import eu.webtoolkit.jwt.servlet.*; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
class ChartState extends WObject { | ||
private static Logger logger = LoggerFactory.getLogger(ChartState.class); | ||
|
||
public ChartState(WObject parent) { | ||
super(parent); | ||
} | ||
|
||
public ChartState() { | ||
this((WObject) null); | ||
} | ||
|
||
public SinModel model; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
examples/widgetgallery/src/eu/webtoolkit/jwt/examples/widgetgallery/SinModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright (C) 2009 Emweb bvba, Leuven, Belgium. | ||
* | ||
* See the LICENSE file for terms of use. | ||
*/ | ||
package eu.webtoolkit.jwt.examples.widgetgallery; | ||
|
||
import java.util.*; | ||
import java.util.regex.*; | ||
import java.io.*; | ||
import java.lang.ref.*; | ||
import java.util.concurrent.locks.ReentrantLock; | ||
import javax.servlet.http.*; | ||
import javax.servlet.*; | ||
import eu.webtoolkit.jwt.*; | ||
import eu.webtoolkit.jwt.chart.*; | ||
import eu.webtoolkit.jwt.utils.*; | ||
import eu.webtoolkit.jwt.servlet.*; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
class SinModel extends WAbstractChartModel { | ||
private static Logger logger = LoggerFactory.getLogger(SinModel.class); | ||
|
||
public SinModel(double minimum, double maximum, WObject parent) { | ||
super(parent); | ||
this.minimum_ = minimum; | ||
this.maximum_ = maximum; | ||
} | ||
|
||
public SinModel(double minimum, double maximum) { | ||
this(minimum, maximum, (WObject) null); | ||
} | ||
|
||
public double getData(int row, int column) { | ||
double x = this.minimum_ + row * (this.maximum_ - this.minimum_) | ||
/ (this.getRowCount() - 1); | ||
if (column == 0) { | ||
return x; | ||
} else { | ||
return Math.sin(x) + Math.sin(x * 100.0) / 40.0; | ||
} | ||
} | ||
|
||
public int getColumnCount() { | ||
return 2; | ||
} | ||
|
||
public int getRowCount() { | ||
return 100; | ||
} | ||
|
||
public double getMinimum() { | ||
return this.minimum_; | ||
} | ||
|
||
public double getMaximum() { | ||
return this.maximum_; | ||
} | ||
|
||
private double minimum_; | ||
private double maximum_; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.