Skip to content

Commit

Permalink
add new package
Browse files Browse the repository at this point in the history
  • Loading branch information
EnnoxHD committed Aug 16, 2020
1 parent dd4a09e commit 857a45a
Show file tree
Hide file tree
Showing 11 changed files with 163 additions and 4 deletions.
1 change: 1 addition & 0 deletions apps/sampler-javafx/sampler-javafx.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
implementation project(':ikonli-entypo-pack')
implementation project(':ikonli-elusive-pack')
implementation project(':ikonli-feather-pack')
implementation project(':ikonli-fluentui-pack')
implementation project(':ikonli-fontawesome-pack')
implementation project(':ikonli-fontawesome5-pack')
implementation project(':ikonli-fontelico-pack')
Expand Down
3 changes: 2 additions & 1 deletion apps/sampler-javafx/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
requires org.kordamp.ikonli.elusive;
requires org.kordamp.ikonli.entypo;
requires org.kordamp.ikonli.feather;
requires org.kordamp.ikonli.fluentui;
requires org.kordamp.ikonli.fontawesome;
requires org.kordamp.ikonli.fontawesome5;
requires org.kordamp.ikonli.fontelico;
Expand Down Expand Up @@ -55,4 +56,4 @@
requires org.kordamp.ikonli.websymbols;
requires org.kordamp.ikonli.zondicons;
uses org.kordamp.ikonli.IkonHandler;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.kordamp.ikonli.elusive.Elusive;
import org.kordamp.ikonli.entypo.Entypo;
import org.kordamp.ikonli.feather.Feather;
import org.kordamp.ikonli.fluentui.FluentUi;
import org.kordamp.ikonli.fontawesome.FontAwesome;
import org.kordamp.ikonli.fontawesome5.FontAwesomeBrands;
import org.kordamp.ikonli.fontawesome5.FontAwesomeRegular;
Expand Down Expand Up @@ -88,6 +89,7 @@ public void start(Stage primaryStage) throws Exception {
tabPane.getTabs().add(new DemoTab(Elusive.class, allOf(Elusive.class)));
tabPane.getTabs().add(new DemoTab(Entypo.class, allOf(Entypo.class)));
tabPane.getTabs().add(new DemoTab(Feather.class, allOf(Feather.class)));
tabPane.getTabs().add(new DemoTab(FluentUi.class, allOf(FluentUi.class)));
tabPane.getTabs().add(new DemoTab(FontAwesome.class, allOf(FontAwesome.class)));
tabPane.getTabs().add(new DemoTab(FontAwesomeBrands.class, allOf(FontAwesomeBrands.class)));
tabPane.getTabs().add(new DemoTab(FontAwesomeSolid.class, allOf(FontAwesomeSolid.class)));
Expand Down Expand Up @@ -154,4 +156,4 @@ private DemoTab(Class<? extends Ikon> iconFontClass, EnumSet<? extends Ikon> enu
}
}
}
}
}
1 change: 1 addition & 0 deletions apps/sampler-swing/sampler-swing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies {
implementation project(':ikonli-elusive-pack')
implementation project(':ikonli-entypo-pack')
implementation project(':ikonli-feather-pack')
implementation project(':ikonli-fluentui-pack')
implementation project(':ikonli-fontawesome-pack')
implementation project(':ikonli-fontawesome5-pack')
implementation project(':ikonli-fontelico-pack')
Expand Down
3 changes: 2 additions & 1 deletion apps/sampler-swing/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
requires org.kordamp.ikonli.elusive;
requires org.kordamp.ikonli.entypo;
requires org.kordamp.ikonli.feather;
requires org.kordamp.ikonli.fluentui;
requires org.kordamp.ikonli.fontawesome;
requires org.kordamp.ikonli.fontawesome5;
requires org.kordamp.ikonli.fontelico;
Expand Down Expand Up @@ -52,4 +53,4 @@
requires org.kordamp.ikonli.websymbols;
requires org.kordamp.ikonli.zondicons;
uses org.kordamp.ikonli.IkonHandler;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.kordamp.ikonli.elusive.Elusive;
import org.kordamp.ikonli.entypo.Entypo;
import org.kordamp.ikonli.feather.Feather;
import org.kordamp.ikonli.fluentui.FluentUi;
import org.kordamp.ikonli.fontawesome.FontAwesome;
import org.kordamp.ikonli.fontawesome5.FontAwesomeBrands;
import org.kordamp.ikonli.fontawesome5.FontAwesomeRegular;
Expand Down Expand Up @@ -85,6 +86,7 @@ private static void launch() {
createTab(tabPane, Elusive.class, new DemoTab(allOf(Elusive.class)));
createTab(tabPane, Entypo.class, new DemoTab(allOf(Entypo.class)));
createTab(tabPane, Feather.class, new DemoTab(allOf(Feather.class)));
createTab(tabPane, FluentUi.class, new DemoTab(allOf(FluentUi.class)));
createTab(tabPane, FontAwesome.class, new DemoTab(allOf(FontAwesome.class)));
createTab(tabPane, FontAwesomeBrands.class, new DemoTab(allOf(FontAwesomeBrands.class)));
createTab(tabPane, FontAwesomeSolid.class, new DemoTab(allOf(FontAwesomeSolid.class)));
Expand Down Expand Up @@ -141,4 +143,4 @@ private DemoTab(EnumSet<? extends Ikon> enumSet) {
}
}
}
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dashiconsVersion = 20200504
elusiveVersion = 2.0
entypoVersion = 1.0
featherVersion = 4.28
fluentuiVersion = 1.1.43
fontawesomeVersion = 4.7.0
fontawesome5Version = 5.13.0
fontelicoVersion = 0.0
Expand Down
22 changes: 22 additions & 0 deletions icon-packs/ikonli-fluentui-pack/ikonli-fluentui-pack.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2020 Andres Almiray
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
dependencies {
api project(':ikonli-core')
compileOnly "org.kordamp.jipsy:jipsy:${jipsyVersion}"
annotationProcessor "org.kordamp.jipsy:jipsy:${jipsyVersion}"
}
25 changes: 25 additions & 0 deletions icon-packs/ikonli-fluentui-pack/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2020 Andres Almiray
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module org.kordamp.ikonli.fluentui {
requires org.kordamp.iconli.core;
requires static org.kordamp.jipsy;
exports org.kordamp.ikonli.fluentui;

provides org.kordamp.ikonli.IkonHandler
with org.kordamp.ikonli.fluentui.FluentUiIkonHandler;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2020 Andres Almiray
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kordamp.ikonli.fluentui;

import org.kordamp.ikonli.Ikon;

/**
* @author Andres Almiray
*/
public enum FluentUi implements Ikon {
;

public static FluentUi findByDescription(String description) {
for (FluentUi font : values()) {
if (font.getDescription().equals(description)) {
return font;
}
}
throw new IllegalArgumentException("Icon description '" + description + "' is invalid!");
}

private String description;
private char code;

FluentUi(String description, char code) {
this.description = description;
this.code = code;
}

@Override
public String getDescription() {
return description;
}

@Override
public char getCode() {
return code;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2020 Andres Almiray
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kordamp.ikonli.fluentui;

import org.kordamp.ikonli.AbstractIkonHandler;
import org.kordamp.ikonli.Ikon;
import org.kordamp.ikonli.IkonHandler;
import org.kordamp.jipsy.ServiceProviderFor;

/**
* @author Andres Almiray
*/
@ServiceProviderFor(IkonHandler.class)
public class FluentUiIkonHandler extends AbstractIkonHandler {
@Override
public boolean supports(String description) {
return description != null && description.startsWith("flt-");
}

@Override
public Ikon resolve(String description) {
return FluentUi.findByDescription(description);
}

@Override
public String getFontResourcePath() {
return "META-INF/resources/fluentui/1.1.43/fonts/fluentui.ttf";
}

@Override
public String getFontFamily() {
return "Fluent UI System Icons";
}
}

0 comments on commit 857a45a

Please sign in to comment.