本文整理汇总了Java中eu.hansolo.tilesfx.Tile.SkinType类的典型用法代码示例。如果您正苦于以下问题:Java SkinType类的具体用法?Java SkinType怎么用?Java SkinType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SkinType类属于eu.hansolo.tilesfx.Tile包,在下文中一共展示了SkinType类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTile
import eu.hansolo.tilesfx.Tile.SkinType; //导入依赖的package包/类
private Tile createTile(final String TITLE, final String TEXT) {
return TileBuilder.create()
/*
.skinType(SkinType.CHARACTER)
.prefSize(200, 200)
.title(TITLE)
.titleAlignment(TextAlignment.CENTER)
.description(TEXT)
.build();
*/
.skinType(SkinType.FLIP)
.characters(Helper.ALPHANUMERIC)
.flipTimeInMS(500)
.prefSize(200, 200)
.title(TITLE)
.titleAlignment(TextAlignment.CENTER)
.flipText(TEXT)
.build();
}
示例2: passAnchor
import eu.hansolo.tilesfx.Tile.SkinType; //导入依赖的package包/类
public void passAnchor(AnchorPane anchor) {
this.anchor = anchor;
ArrayList<ChartData> dat = new ArrayList<>();
dat.add(new ChartData(50));
dat.add(new ChartData(50));
dat.add(new ChartData(50));
dat.add(new ChartData(50));
dat.add(new ChartData(50));
createToneChart(dat);
Tile gauge = TileBuilder.create()
.skinType(SkinType.GAUGE)
.prefSize(150, 150)
.layoutX(490)
.layoutY(440)
.title("Toxcity")
.unit("%")
.threshold(100)
.thresholdVisible(false)
.build();
gauge.setId("gauge");
anchor.getChildren().add(gauge);
Tile circularProgressTile = TileBuilder.create()
.skinType(SkinType.CIRCULAR_PROGRESS)
.prefSize(150, 150)
.layoutX(490 + 150 + 10)
.layoutY(440)
.title("Complexity")
.text("")
.unit("\u0025")
//.graphic(new WeatherSymbol(ConditionAndIcon.CLEAR_DAY, 48, Color.WHITE))
.build();
circularProgressTile.setId("circle");
anchor.getChildren().add(circularProgressTile);
}
示例3: createToneChart
import eu.hansolo.tilesfx.Tile.SkinType; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void createToneChart(List<ChartData> list) {
if (tile != null) {
anchor.getChildren().remove(tile);
tile = null;
}
List<ChartData> emptyList = new ArrayList<ChartData>();
for(int i = 0; i < list.size(); i++) {
emptyList.add(new ChartData(0));
}
tile = TileBuilder.create().skinType(SkinType.RADAR_CHART)
.prefSize(310, 410)
.layoutX(490)
.layoutY(15)
.minValue(0)
.maxValue(100)
//.title("RadarChart Tile")
.unit("Tones")
.radarChartMode(Mode.POLYGON)
.gradientStops(new Stop(0.00000, Color.TRANSPARENT),
new Stop(0.00001, Color.web("#3552a0")),
new Stop(0.09090, Color.web("#456acf")),
new Stop(0.27272, Color.web("#45a1cf")),
new Stop(0.36363, Color.web("#30c8c9")),
new Stop(0.45454, Color.web("#30c9af")),
new Stop(0.50909, Color.web("#56d483")),
new Stop(0.72727, Color.web("#9adb49")),
new Stop(0.81818, Color.web("#efd750")),
new Stop(0.90909, Color.web("#ef9850")),
new Stop(1.00000, Color.web("#ef6050")))
//.text("Sector")
.tooltipText("")
.chartData(emptyList)
.animated(true)
.build();
emptyList = tile.getChartData();
for (int i = 0; i < list.size(); i++) {
emptyList.get(i).setName(list.get(i).getName());
emptyList.get(i).setValue(list.get(i).getValue());
}
anchor.getChildren().add(tile);
}
示例4: init
import eu.hansolo.tilesfx.Tile.SkinType; //导入依赖的package包/类
@Override public void init() {
List<Location> trackPoints;
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
InputStream gpxInput = GpxParseDemo.class.getResourceAsStream("track.gpx");
SAXParser saxParser = factory.newSAXParser();
GpxHandler handler = new GpxHandler();
saxParser.parse(gpxInput, handler);
trackPoints = handler.getTrack();
} catch (Throwable err) {
System.out.println(err);
trackPoints = new ArrayList<>();
}
tile = TileBuilder.create()
.prefSize(800, 800)
.skinType(SkinType.MAP)
.title("Choose B&W, Bright, or Dark")
.text("Lago Retico")
.currentLocation(new Location(46.57608333, 8.89241667, "Lago Retico", "Map"))
.track(trackPoints)
.trackColor(TileColor.MAGENTA)
.pointsOfInterest(new Location(46.57608333, 8.89241667, "POI 1"),
//new Location(51.912529, 7.631752, "POI 2", TileColor.YELLOW_ORANGE),
new Location(46.57661111, 8.89344444, "POI 3"))
.build();
}
示例5: skinType
import eu.hansolo.tilesfx.Tile.SkinType; //导入依赖的package包/类
public final B skinType(final SkinType TYPE) {
properties.put("skinType", new SimpleObjectProperty<>(TYPE));
return (B)this;
}
示例6: musicSetting
import eu.hansolo.tilesfx.Tile.SkinType; //导入依赖的package包/类
public Tile musicSetting() {
Tile switchSliderTile = TileBuilder.create()
.skinType(SkinType.SWITCH_SLIDER)
.prefSize(450, 150)
.backgroundColor(Color.BLACK)//.rgb(105,105,105))//.DARKGRAY)//.rgb(255, 255, 255, 0.1))
//.title(title)
.description("Background Music Volume")
.descriptionAlignment(Pos.TOP_CENTER)
.textVisible(true)
.decimals(0)
.minValue(0)
.maxValue(100)
.value(music_v)
.build();
switchSliderTile.setActive(true);
switchSliderTile.valueProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> ov, Number old_val, Number new_val) {
if (old_val != new_val) {
float vol = new_val.floatValue();
if (vol <= 5) {
music_v = 0;
//System.out.println("Background Music is mute.");
switchSliderTile.setValue(0);
switchSliderTile.setActive(false);
} else {
music_v = ((int)(vol*5f))/5;
switchSliderTile.setActive(true);
}
if (!switchSliderTile.isActive()) {
switchSliderTile.setValue(0);
//switchSliderTile.setActive(false);
}
}
}
});
switchSliderTile.setOnSwitchPressed(e -> {
if (switchSliderTile.getCurrentValue() < 5 || !switchSliderTile.isActive()) {
switchSliderTile.setValue(0);
switchSliderTile.setActive(false);
}
else {
switchSliderTile.setActive(true);
if (switchSliderTile.getCurrentValue() < 5)
switchSliderTile.setValue(80);
}
});
switchSliderTile.setOnSwitchReleased(e -> {
if (switchSliderTile.getCurrentValue() < 5 || !switchSliderTile.isActive()) {
switchSliderTile.setValue(0);
switchSliderTile.setActive(false);
}
else {
switchSliderTile.setActive(true);
if (switchSliderTile.getCurrentValue() < 5)
switchSliderTile.setValue(80);
}
});
return switchSliderTile;
}
示例7: soundEffectSetting
import eu.hansolo.tilesfx.Tile.SkinType; //导入依赖的package包/类
public Tile soundEffectSetting() {
Tile switchSliderTile = TileBuilder.create()
.skinType(SkinType.SWITCH_SLIDER)
.prefSize(450, 150)
.backgroundColor(Color.BLACK)//.rgb(105,105,105))//.DARKGRAY)//.rgb(255, 255, 255, 0.1))
//.title(title)
.description("Sound Effect Volume")
.descriptionAlignment(Pos.TOP_CENTER)
.textVisible(true)
.decimals(0)
.minValue(0)
.maxValue(100)
.value(sound_effect_v)
.build();
switchSliderTile.setActive(true);
switchSliderTile.valueProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> ov, Number old_val, Number new_val) {
if (old_val != new_val) {
float vol = new_val.floatValue();
if (vol <= 5) {
sound_effect_v = 0f;
switchSliderTile.setValue(0);
//System.out.println("Sound Effect is mute.");
switchSliderTile.setActive(false);
} else {
sound_effect_v = ((int)(vol*5f))/5;
switchSliderTile.setActive(true);
}
if (!switchSliderTile.isActive()) {
switchSliderTile.setValue(0);
//switchSliderTile.setActive(false);
}
}
}
});
switchSliderTile.setOnSwitchPressed(e -> {
if (switchSliderTile.getCurrentValue() < 5 || !switchSliderTile.isActive()) {
switchSliderTile.setValue(0);
switchSliderTile.setActive(false);
}
else {
switchSliderTile.setActive(true);
if (switchSliderTile.getCurrentValue() < 5)
switchSliderTile.setValue(80);
}
});
switchSliderTile.setOnSwitchReleased(e -> {
if (switchSliderTile.getCurrentValue() < 5 || !switchSliderTile.isActive()) {
switchSliderTile.setValue(0);
switchSliderTile.setActive(false);
}
else {
switchSliderTile.setActive(true);
if (switchSliderTile.getCurrentValue() < 5)
switchSliderTile.setValue(80);
}
});
return switchSliderTile;
}