use of com.cas.sim.tis.svg.SVGGlyph in project TeachingInSimulation by ScOrPiOzzy.
the class Decoration method maximize.
public void maximize() {
if (GUIState.getStage().isMaximized()) {
max.setGraphic(new SVGGlyph("iconfont.svg.revert", Color.web("#A2CBF3"), 10));
maxTip.setText(MsgUtil.getMessage("button.revert"));
} else {
max.setGraphic(new SVGGlyph("iconfont.svg.max", Color.web("#A2CBF3"), 10));
maxTip.setText(MsgUtil.getMessage("button.maximize"));
}
}
use of com.cas.sim.tis.svg.SVGGlyph in project TeachingInSimulation by ScOrPiOzzy.
the class LeftMenu method addMenuItem.
protected void addMenuItem(String name, String svg, EventHandler<ActionEvent> e) {
SVGGlyph glyph = new SVGGlyph(svg, Color.WHITE, 22);
ToggleButton button = new ToggleButton(name, glyph);
button.setOnAction(e);
button.getStyleClass().add("left-menu");
menu.getChildren().add(button);
items.getToggles().add(button);
}
use of com.cas.sim.tis.svg.SVGGlyph in project TeachingInSimulation by ScOrPiOzzy.
the class ResourceViewer method loadResourceInfo.
/**
* 加载资源信息
*/
private void loadResourceInfo() {
ResourceInfo info = SpringUtil.getBean(ResourceAction.class).findResourceInfoByID(resource.getId());
if (info != null) {
this.creator.setText(MsgUtil.getMessage("resource.creator", info.getCreator()));
this.createDate.setText(MsgUtil.getMessage("resource.create.date", DateUtil.date2Str(info.getCreateDate(), DateUtil.DATE_SHT_PAT_10_)));
this.browsedTimes.setText(MsgUtil.getMessage("resource.browse.times", String.valueOf(info.getBrowsedTimes())));
this.collectedTimes.setText(MsgUtil.getMessage("resource.collection.times", String.valueOf(info.getCollectedTimes())));
}
collected = SpringUtil.getBean(CollectionAction.class).checkCollected(resource.getId());
if (collected) {
this.collectedBtn.setGraphic(new SVGGlyph("iconfont.svg.collected", Color.web("#ff9e2c"), 25));
this.collectedBtn.setText(MsgUtil.getMessage("resource.collection.done"));
} else {
this.collectedBtn.setGraphic(new SVGGlyph("iconfont.svg.uncollect", Color.web("#ff9e2c"), 25));
this.collectedBtn.setText(MsgUtil.getMessage("resource.collection.todo"));
}
}
use of com.cas.sim.tis.svg.SVGGlyph in project TeachingInSimulation by ScOrPiOzzy.
the class ResourceViewer method collect.
@FXML
private void collect() {
Integer rid = resource.getId();
if (collected) {
this.collectedBtn.setGraphic(new SVGGlyph("iconfont.svg.uncollect", Color.web("#ff9e2c"), 25));
this.collectedBtn.setText(MsgUtil.getMessage("resource.collection.todo"));
SpringUtil.getBean(ResourceAction.class).uncollect(rid);
collected = false;
} else {
this.collectedBtn.setGraphic(new SVGGlyph("iconfont.svg.collected", Color.web("#ff9e2c"), 25));
this.collectedBtn.setText(MsgUtil.getMessage("resource.collection.done"));
SpringUtil.getBean(ResourceAction.class).collected(rid);
collected = true;
}
}
use of com.cas.sim.tis.svg.SVGGlyph in project TeachingInSimulation by ScOrPiOzzy.
the class DrawingController method toggle.
@FXML
private void toggle(ActionEvent event) {
if (expanding) {
expand.setMinHeight(40);
expand.setMaxHeight(40);
((Button) event.getSource()).setGraphic(new SVGGlyph("iconfont.svg.up", Color.web("#19b0c6"), 10));
} else {
expand.setMinHeight(140);
expand.setMaxHeight(140);
((Button) event.getSource()).setGraphic(new SVGGlyph("iconfont.svg.down", Color.web("#19b0c6"), 10));
}
expanding = !expanding;
}
Aggregations