Skip to content

Commit 28e3ca4

Browse files
committed
adding 3 more projects
1 parent 4275661 commit 28e3ca4

38 files changed

Lines changed: 11870 additions & 0 deletions

Ikonli with Java Swing/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
nbproject/private/
2+
3+
build/
4+
5+
nbbuild/
6+
7+
dist/
8+
9+
nbdist/
10+

Ikonli with Java Swing/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>project.prince.library</groupId>
5+
<artifactId>mavenproject1</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<packaging>jar</packaging>
8+
<properties>
9+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10+
<maven.compiler.source>1.8</maven.compiler.source>
11+
<maven.compiler.target>1.8</maven.compiler.target>
12+
</properties>
13+
14+
<dependencies>
15+
<dependency>
16+
<groupId>org.kordamp.ikonli</groupId>
17+
<artifactId>ikonli-swing</artifactId>
18+
<version>2.3.0</version>
19+
</dependency>
20+
<dependency>
21+
<groupId>org.kordamp.ikonli</groupId>
22+
<artifactId>ikonli-materialdesign-pack</artifactId>
23+
<version>2.3.0</version>
24+
</dependency>
25+
</dependencies>
26+
<name>IkonSample</name>
27+
</project>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
4+
<Properties>
5+
<Property name="defaultCloseOperation" type="int" value="3"/>
6+
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
7+
<Color blue="ff" green="ff" red="ff" type="rgb"/>
8+
</Property>
9+
</Properties>
10+
<SyntheticProperties>
11+
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
12+
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
13+
</SyntheticProperties>
14+
<AuxValues>
15+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
16+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
17+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
18+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
19+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
20+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
21+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
22+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
23+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
24+
</AuxValues>
25+
26+
<Layout>
27+
<DimensionLayout dim="0">
28+
<Group type="103" groupAlignment="0" attributes="0">
29+
<Component id="jPanel1" alignment="1" max="32767" attributes="0"/>
30+
</Group>
31+
</DimensionLayout>
32+
<DimensionLayout dim="1">
33+
<Group type="103" groupAlignment="0" attributes="0">
34+
<Component id="jPanel1" alignment="1" max="32767" attributes="0"/>
35+
</Group>
36+
</DimensionLayout>
37+
</Layout>
38+
<SubComponents>
39+
<Container class="javax.swing.JPanel" name="jPanel1">
40+
<Properties>
41+
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
42+
<Color blue="ff" green="ff" red="ff" type="rgb"/>
43+
</Property>
44+
</Properties>
45+
46+
<Layout>
47+
<DimensionLayout dim="0">
48+
<Group type="103" groupAlignment="0" attributes="0">
49+
<Group type="102" alignment="0" attributes="0">
50+
<Component id="root" min="-2" pref="955" max="-2" attributes="0"/>
51+
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
52+
</Group>
53+
</Group>
54+
</DimensionLayout>
55+
<DimensionLayout dim="1">
56+
<Group type="103" groupAlignment="0" attributes="0">
57+
<Component id="root" alignment="0" pref="719" max="32767" attributes="0"/>
58+
</Group>
59+
</DimensionLayout>
60+
</Layout>
61+
<SubComponents>
62+
<Container class="javax.swing.JPanel" name="root">
63+
<Events>
64+
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="rootMouseClicked"/>
65+
</Events>
66+
67+
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
68+
<Property name="alignment" type="int" value="0"/>
69+
</Layout>
70+
</Container>
71+
</SubComponents>
72+
</Container>
73+
</SubComponents>
74+
</Form>
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
package com.genuinecoder;
2+
3+
import java.awt.Color;
4+
import java.awt.GridLayout;
5+
import java.util.Random;
6+
import javax.swing.JLabel;
7+
import javax.swing.JOptionPane;
8+
import javax.swing.JPanel;
9+
import javax.swing.border.LineBorder;
10+
import org.kordamp.ikonli.materialdesign.MaterialDesign;
11+
import org.kordamp.ikonli.swing.FontIcon;
12+
13+
/**
14+
* @author Villan
15+
*/
16+
public class Main extends javax.swing.JFrame {
17+
18+
public Main() {
19+
initComponents();
20+
setTitle("Genuine Coder");
21+
prepareIcons();
22+
pack();
23+
setLocationRelativeTo(null);
24+
}
25+
26+
@SuppressWarnings("unchecked")
27+
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
28+
private void initComponents() {
29+
30+
jPanel1 = new javax.swing.JPanel();
31+
root = new javax.swing.JPanel();
32+
33+
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
34+
setBackground(new java.awt.Color(255, 255, 255));
35+
36+
jPanel1.setBackground(new java.awt.Color(255, 255, 255));
37+
38+
root.addMouseListener(new java.awt.event.MouseAdapter() {
39+
public void mouseClicked(java.awt.event.MouseEvent evt) {
40+
rootMouseClicked(evt);
41+
}
42+
});
43+
root.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
44+
45+
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
46+
jPanel1.setLayout(jPanel1Layout);
47+
jPanel1Layout.setHorizontalGroup(
48+
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
49+
.addGroup(jPanel1Layout.createSequentialGroup()
50+
.addComponent(root, javax.swing.GroupLayout.PREFERRED_SIZE, 955, javax.swing.GroupLayout.PREFERRED_SIZE)
51+
.addGap(0, 0, Short.MAX_VALUE))
52+
);
53+
jPanel1Layout.setVerticalGroup(
54+
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
55+
.addComponent(root, javax.swing.GroupLayout.DEFAULT_SIZE, 719, Short.MAX_VALUE)
56+
);
57+
58+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
59+
getContentPane().setLayout(layout);
60+
layout.setHorizontalGroup(
61+
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
62+
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
63+
);
64+
layout.setVerticalGroup(
65+
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
66+
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
67+
);
68+
69+
pack();
70+
}// </editor-fold>//GEN-END:initComponents
71+
72+
private void rootMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rootMouseClicked
73+
FontIcon fontIcon = FontIcon.of(MaterialDesign.MDI_YOUTUBE_PLAY);
74+
fontIcon.setIconSize(50);
75+
fontIcon.setIconColor(Color.RED);
76+
JOptionPane.showConfirmDialog(rootPane, "Upload to YouTube?", "Upload video", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE, fontIcon);
77+
}//GEN-LAST:event_rootMouseClicked
78+
79+
public static void main(String args[]) {
80+
try {
81+
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
82+
if ("Nimbus".equals(info.getName())) {
83+
javax.swing.UIManager.setLookAndFeel(info.getClassName());
84+
break;
85+
}
86+
}
87+
} catch (ClassNotFoundException ex) {
88+
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
89+
} catch (InstantiationException ex) {
90+
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
91+
} catch (IllegalAccessException ex) {
92+
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
93+
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
94+
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
95+
}
96+
97+
java.awt.EventQueue.invokeLater(new Runnable() {
98+
public void run() {
99+
new Main().setVisible(true);
100+
}
101+
});
102+
}
103+
104+
private void prepareIcons() {
105+
addIcon(MaterialDesign.MDI_ACCOUNT);
106+
addIcon(MaterialDesign.MDI_ACCOUNT_ALERT);
107+
addIcon(MaterialDesign.MDI_ACCOUNT_BOX);
108+
addIcon(MaterialDesign.MDI_ACCOUNT_CHECK);
109+
addIcon(MaterialDesign.MDI_ACCOUNT_CIRCLE);
110+
addIcon(MaterialDesign.MDI_ACCOUNT_MULTIPLE);
111+
addIcon(MaterialDesign.MDI_ACCOUNT_STAR_VARIANT);
112+
addIcon(MaterialDesign.MDI_AIRPLANE_OFF);
113+
addIcon(MaterialDesign.MDI_ZIP_BOX);
114+
addIcon(MaterialDesign.MDI_YOUTUBE_PLAY);
115+
addIcon(MaterialDesign.MDI_YELP);
116+
addIcon(MaterialDesign.MDI_XBOX_CONTROLLER);
117+
addIcon(MaterialDesign.MDI_WINDOW_OPEN);
118+
addIcon(MaterialDesign.MDI_WEATHER_WINDY_VARIANT);
119+
addIcon(MaterialDesign.MDI_VIEW_CAROUSEL);
120+
addIcon(MaterialDesign.MDI_SALE);
121+
addIcon(MaterialDesign.MDI_SATELLITE);
122+
addIcon(MaterialDesign.MDI_SAXOPHONE);
123+
addIcon(MaterialDesign.MDI_SCALE_BALANCE);
124+
addIcon(MaterialDesign.MDI_SCHOOL);
125+
addIcon(MaterialDesign.MDI_ACCOUNT_MINUS);
126+
addIcon(MaterialDesign.MDI_JEEPNEY);
127+
addIcon(MaterialDesign.MDI_LAMBDA);
128+
addIcon(MaterialDesign.MDI_KETTLE);
129+
}
130+
131+
private void addIcon(MaterialDesign icon) {
132+
JPanel panel = new JPanel();
133+
panel.setBackground(Color.decode("#FAFAFA"));
134+
panel.setBorder(new LineBorder(Color.GRAY));
135+
panel.setLayout(new GridLayout());
136+
panel.setSize(300, 300);
137+
138+
FontIcon fontIcon = FontIcon.of(icon);
139+
fontIcon.setIconSize(150);
140+
fontIcon.setIconColor(Color.decode(getRandomColor()));
141+
142+
JLabel label = new JLabel();
143+
label.setIcon(fontIcon);
144+
panel.add(label);
145+
root.add(panel);
146+
}
147+
148+
private String getRandomColor() {
149+
String[] colors = {"#d32f2f", "#C2185B", "#7B1FA2", "#512DA8", "#303F9F", "#1976D2", "#0288D1", "#0097A7", "#00796B"};
150+
int index = new Random().nextInt(colors.length);
151+
return colors[index];
152+
}
153+
154+
// Variables declaration - do not modify//GEN-BEGIN:variables
155+
private javax.swing.JPanel jPanel1;
156+
private javax.swing.JPanel root;
157+
// End of variables declaration//GEN-END:variables
158+
159+
}

Ikonli with Java Swing/target/classes/.netbeans_automatic_build

Whitespace-only changes.
733 Bytes
Binary file not shown.
537 Bytes
Binary file not shown.
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Generated by Maven
2+
#Sun Sep 09 22:41:44 IST 2018
3+
version=1.0-SNAPSHOT
4+
groupId=project.prince.library
5+
artifactId=mavenproject1
6.94 KB
Binary file not shown.

0 commit comments

Comments
 (0)