本文整理汇总了Java中org.kordamp.ikonli.Ikon类的典型用法代码示例。如果您正苦于以下问题:Java Ikon类的具体用法?Java Ikon怎么用?Java Ikon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Ikon类属于org.kordamp.ikonli包,在下文中一共展示了Ikon类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: build
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public final Location build() {
final Location LOCATION = new Location();
for (String key : properties.keySet()) {
if ("name".equals(key)) {
LOCATION.setName(((StringProperty) properties.get(key)).get());
} else if ("latitude".equals(key)) {
LOCATION.setLatitude(((DoubleProperty) properties.get(key)).get());
} else if ("longitude".equals(key)) {
LOCATION.setLongitude(((DoubleProperty) properties.get(key)).get());
} else if ("info".equals(key)) {
LOCATION.setInfo(((StringProperty) properties.get(key)).get());
} else if ("color".equals(key)) {
LOCATION.setColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("iconCode".equals(key)) {
LOCATION.setIconCode(((ObjectProperty<Ikon>) properties.get(key)).get());
} else if ("iconSize".equals(key)) {
LOCATION.setIconSize(((IntegerProperty) properties.get(key)).get());
} else if ("mouseEnterHandler".equals(key)) {
LOCATION.setMouseEnterHandler(((ObjectProperty<EventHandler<MouseEvent>>) properties.get(key)).get());
} else if ("mousePressHandler".equals(key)) {
LOCATION.setMousePressHandler(((ObjectProperty<EventHandler<MouseEvent>>) properties.get(key)).get());
} else if ("mouseReleaseHandler".equals(key)) {
LOCATION.setMouseReleaseHandler(((ObjectProperty<EventHandler<MouseEvent>>) properties.get(key)).get());
} else if ("mouseExitHandler".equals(key)) {
LOCATION.setMouseExitHandler(((ObjectProperty<EventHandler<MouseEvent>>) properties.get(key)).get());
}
}
return LOCATION;
}
开发者ID:HanSolo,项目名称:worldheatmap,代码行数:32,代码来源:LocationBuilder.java
示例2: Location
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public Location(final String NAME, final double LATITUDE, final double LONGITUDE, final String INFO, final Color COLOR, final Ikon ICON_CODE, final int ICON_SIZE) {
name = NAME;
latitude = LATITUDE;
longitude = LONGITUDE;
info = INFO;
color = COLOR;
iconCode = ICON_CODE;
iconSize = ICON_SIZE;
}
开发者ID:HanSolo,项目名称:worldheatmap,代码行数:10,代码来源:Location.java
示例3: getIconAsNode
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
/**
*
* @param fontIcon
* @return
*/
public Node getIconAsNode(Ikon fontIcon) {
if (fontIcon == null) {
throw new IllegalArgumentException("'fontIcon' can't be NULL."); // NOI18N
}
// TODO add more data (size, color...)
final Node node = new FontIcon(fontIcon);
return node;
}
开发者ID:Naoghuman,项目名称:Incubator,代码行数:16,代码来源:AbstractIkonliHandler.java
示例4: testIkonIsFound
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
@Test
public void testIkonIsFound() {
final String fontIconName = "oct-alert";
final Ikon actualIkon = handler.resolve(fontIconName);
assertNotNull("actualIkon can't be NULL", actualIkon);
final Ikon expectedIkon = Octicons.ALERT;
assertEquals("actualIkon.ALERT must be Octicons.ALERT.getDescription() -> oct-alert", expectedIkon, actualIkon);
}
开发者ID:Naoghuman,项目名称:Incubator,代码行数:11,代码来源:OcticonsIkonliHandlerTest.java
示例5: testIkonNOTFound
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
@Test(expected=IllegalArgumentException.class)
public void testIkonNOTFound() {
final String fontIconName = "DONT_EXISTS";
final Ikon actualIkon = handler.resolve(fontIconName);
assertNull("Ikon.DONT_EXISTS can't exists", actualIkon);
}
开发者ID:Naoghuman,项目名称:Incubator,代码行数:8,代码来源:OcticonsIkonliHandlerTest.java
示例6: FunMenuItem
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public FunMenuItem(final Ikon CODE) {
getStylesheets().add(FunMenuItem.class.getResource("funmenu.css").toExternalForm());
iconColor = new SimpleStyleableObjectProperty<>(ICON_COLOR, this, "iconColor");
iconCode = CODE;
init();
initGraphics();
registerListeners();
}
开发者ID:HanSolo,项目名称:funmenu,代码行数:9,代码来源:FunMenuItem.java
示例7: initializeButton
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
private void initializeButton(Button btn, Ikon icon, String tooltip) {
final FontIcon fi = new FontIcon(icon);
fi.setIconSize(24);
btn.setGraphic(fi);
btn.setText(null);
btn.setTooltip(new Tooltip(tooltip));
}
开发者ID:Naoghuman,项目名称:SokubanFX,代码行数:8,代码来源:GamePresenter.java
示例8: iconCode
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public final B iconCode(final Ikon CODE) {
properties.put("iconCode", new SimpleObjectProperty(CODE));
return (B)this;
}
开发者ID:HanSolo,项目名称:worldheatmap,代码行数:5,代码来源:LocationBuilder.java
示例9: locationIconCode
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public final B locationIconCode(final Ikon ICON_CODE) {
properties.put("locationIconCode", new SimpleObjectProperty<>(ICON_CODE));
return (B)this;
}
开发者ID:HanSolo,项目名称:worldheatmap,代码行数:5,代码来源:WorldBuilder.java
示例10: resolve
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
@Override
public Ikon resolve(String fontIconName) {
final Ikon ikon = Octicons.findByDescription(fontIconName);
return ikon;
}
开发者ID:Naoghuman,项目名称:Incubator,代码行数:7,代码来源:OcticonsIkonliHandler.java
示例11: setItem1IconCode
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public void setItem1IconCode(final Ikon CODE) {
if (null == CODE) return;
item1.setIconCode(CODE);
item1.getIcon().setOnMousePressed(closeHandler);
}
开发者ID:HanSolo,项目名称:funmenu,代码行数:6,代码来源:FunMenu.java
示例12: setItem2IconCode
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public void setItem2IconCode(final Ikon CODE) {
if (null == CODE) return;
item2.setIconCode(CODE);
item2.getIcon().setOnMousePressed(closeHandler);
}
开发者ID:HanSolo,项目名称:funmenu,代码行数:6,代码来源:FunMenu.java
示例13: setItem3IconCode
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public void setItem3IconCode(final Ikon CODE) {
if (null == CODE) return;
item3.setIconCode(CODE);
item3.getIcon().setOnMousePressed(closeHandler);
}
开发者ID:HanSolo,项目名称:funmenu,代码行数:6,代码来源:FunMenu.java
示例14: setItem4IconCode
import org.kordamp.ikonli.Ikon; //导入依赖的package包/类
public void setItem4IconCode(final Ikon CODE) {
if (null == CODE) return;
item4.setIconCode(CODE);
item4.getIcon().setOnMousePressed(closeHandler);
}
开发者ID:HanSolo,项目名称:funmenu,代码行数:6,代码来源:FunMenu.java
注:本文中的org.kordamp.ikonli.Ikon类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论