-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
163 additions
and
4 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
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
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
22 changes: 22 additions & 0 deletions
22
icon-packs/ikonli-fluentui-pack/ikonli-fluentui-pack.gradle
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,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
25
icon-packs/ikonli-fluentui-pack/src/main/java/module-info.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,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; | ||
} |
54 changes: 54 additions & 0 deletions
54
icon-packs/ikonli-fluentui-pack/src/main/java/org/kordamp/ikonli/fluentui/FluentUi.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,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; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...s/ikonli-fluentui-pack/src/main/java/org/kordamp/ikonli/fluentui/FluentUiIkonHandler.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,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"; | ||
} | ||
} |