├── .gitignore ├── src └── raven │ ├── themes │ ├── FlatLightLaf.properties │ ├── FlatDarkLaf.properties │ └── FlatLaf.properties │ ├── resources │ ├── image │ │ └── profile.png │ ├── icon │ │ ├── menu.svg │ │ ├── redo.svg │ │ ├── undo.svg │ │ ├── dark.svg │ │ ├── refresh.svg │ │ └── light.svg │ └── menu │ │ ├── logout.svg │ │ ├── forms.svg │ │ ├── email.svg │ │ ├── chart.svg │ │ ├── calendar.svg │ │ ├── dashboard.svg │ │ ├── icon.svg │ │ ├── ui.svg │ │ ├── chat.svg │ │ └── page.svg │ ├── model │ └── ModelUser.java │ ├── components │ ├── SimpleForm.java │ ├── Background.java │ └── MainForm.java │ ├── swing │ └── slider │ │ ├── SliderTransition.java │ │ ├── PanelSlider.java │ │ └── SimpleTransition.java │ ├── menu │ ├── Menu.java │ ├── ThemesChange.java │ ├── FormManager.java │ └── MyDrawerBuilder.java │ ├── application │ └── Application.java │ ├── forms │ ├── InboxForm.java │ ├── InboxForm.form │ ├── ReadForm.java │ ├── ReadForm.form │ └── DashboardForm.java │ ├── utils │ ├── UndoRedo.java │ └── DateCalculator.java │ └── login │ └── Login.java ├── manifest.mf ├── screenshot ├── dark.png ├── light.png ├── dark full.png └── light full.png ├── library ├── jsvg-1.4.0.jar ├── flatlaf-3.4.1.jar ├── miglayout-core.jar ├── miglayout-swing.jar ├── flatlaf-extras-3.4.1.jar ├── datechooser-swing-1.4.1.jar ├── swing-chart-1.1.0-beta.jar ├── flatlaf-fonts-roboto-2.137.jar └── swing-glasspane-popup-1.5.1.jar ├── nbproject ├── genfiles.properties ├── project.xml ├── project.properties └── build-impl.xml ├── README.md └── test └── test ├── Test.java └── Test.form /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /nbproject/private/ 3 | /dist/ 4 | -------------------------------------------------------------------------------- /src/raven/themes/FlatLightLaf.properties: -------------------------------------------------------------------------------- 1 | 2 | Drawer.background=@accentColor -------------------------------------------------------------------------------- /src/raven/themes/FlatDarkLaf.properties: -------------------------------------------------------------------------------- 1 | 2 | Drawer.background=lighten(@background,5%) 3 | -------------------------------------------------------------------------------- /manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /screenshot/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/screenshot/dark.png -------------------------------------------------------------------------------- /screenshot/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/screenshot/light.png -------------------------------------------------------------------------------- /library/jsvg-1.4.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/jsvg-1.4.0.jar -------------------------------------------------------------------------------- /library/flatlaf-3.4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/flatlaf-3.4.1.jar -------------------------------------------------------------------------------- /library/miglayout-core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/miglayout-core.jar -------------------------------------------------------------------------------- /screenshot/dark full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/screenshot/dark full.png -------------------------------------------------------------------------------- /screenshot/light full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/screenshot/light full.png -------------------------------------------------------------------------------- /library/miglayout-swing.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/miglayout-swing.jar -------------------------------------------------------------------------------- /library/flatlaf-extras-3.4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/flatlaf-extras-3.4.1.jar -------------------------------------------------------------------------------- /library/datechooser-swing-1.4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/datechooser-swing-1.4.1.jar -------------------------------------------------------------------------------- /library/swing-chart-1.1.0-beta.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/swing-chart-1.1.0-beta.jar -------------------------------------------------------------------------------- /library/flatlaf-fonts-roboto-2.137.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/flatlaf-fonts-roboto-2.137.jar -------------------------------------------------------------------------------- /src/raven/resources/image/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/src/raven/resources/image/profile.png -------------------------------------------------------------------------------- /library/swing-glasspane-popup-1.5.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DJ-Raven/flatlaf-dashboard-pro/HEAD/library/swing-glasspane-popup-1.5.1.jar -------------------------------------------------------------------------------- /src/raven/themes/FlatLaf.properties: -------------------------------------------------------------------------------- 1 | 2 | @accentColor=#5856D6 3 | 4 | Component.focusWidth=1 5 | Component.arc=10 6 | Button.arc=10 7 | Button.margin=4,6,4,6 8 | TextComponent.arc=10 9 | TextField.margin=4,6,4,6 10 | PasswordField.margin=4,6,4,6 11 | ComboBox.padding=4,6,4,6 -------------------------------------------------------------------------------- /src/raven/resources/icon/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=45e0cfc6 2 | build.xml.script.CRC32=664884ab 3 | build.xml.stylesheet.CRC32=f85dc8f2@1.109.0.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=45e0cfc6 7 | nbproject/build-impl.xml.script.CRC32=e0b09c56 8 | nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.109.0.48 9 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | flatlaf-dashboard-pro 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/raven/resources/icon/redo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/icon/undo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/model/ModelUser.java: -------------------------------------------------------------------------------- 1 | package raven.model; 2 | 3 | /** 4 | * 5 | * @author Raven 6 | */ 7 | public class ModelUser { 8 | 9 | public String getUserName() { 10 | return userName; 11 | } 12 | 13 | public void setUserName(String userName) { 14 | this.userName = userName; 15 | } 16 | 17 | public boolean isAdmin() { 18 | return admin; 19 | } 20 | 21 | public void setAdmin(boolean admin) { 22 | this.admin = admin; 23 | } 24 | 25 | public ModelUser(String userName, boolean admin) { 26 | this.userName = userName; 27 | this.admin = admin; 28 | } 29 | 30 | public ModelUser() { 31 | } 32 | 33 | private String userName; 34 | private boolean admin; 35 | } 36 | -------------------------------------------------------------------------------- /src/raven/components/SimpleForm.java: -------------------------------------------------------------------------------- 1 | package raven.components; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import javax.swing.JPanel; 5 | 6 | /** 7 | * 8 | * @author Raven 9 | */ 10 | public class SimpleForm extends JPanel { 11 | 12 | public SimpleForm() { 13 | init(); 14 | } 15 | 16 | private void init() { 17 | putClientProperty(FlatClientProperties.STYLE, "" 18 | + "border:5,5,5,5;" 19 | + "background:null"); 20 | } 21 | 22 | public void formInitAndOpen() { 23 | 24 | } 25 | 26 | public void formOpen() { 27 | 28 | } 29 | 30 | public void formRefresh() { 31 | 32 | } 33 | 34 | public boolean formClose() { 35 | return true; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/raven/resources/menu/logout.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flatlaf Dashboard Pro 2 | Java swing dashboard build with flatlaf 3 | 4 | ## libraries 5 | - [FlatLaf](https://github.com/JFormDesigner/FlatLaf) - FlatLaf library for the modern UI design theme 6 | - [MigLayout](https://github.com/mikaelgrev/miglayout) - MigLayout library for flexible layout management 7 | 8 | ## Screenshot 9 | sample dark full  10 | sample dark  11 | sample light full  12 | sample light full 13 | -------------------------------------------------------------------------------- /src/raven/resources/menu/forms.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/swing/slider/SliderTransition.java: -------------------------------------------------------------------------------- 1 | package raven.swing.slider; 2 | 3 | import java.awt.Component; 4 | import java.awt.Graphics; 5 | import java.awt.Image; 6 | 7 | /** 8 | * 9 | * @author Raven 10 | */ 11 | public abstract class SliderTransition { 12 | 13 | public abstract void renderImageOld(Component component, Graphics g, Image image, int width, int height, float animate); 14 | 15 | public abstract void renderImageNew(Component component, Graphics g, Image image, int width, int height, float animate); 16 | 17 | public boolean closeAfterAnimation() { 18 | return true; 19 | } 20 | 21 | public void render(Component component, Graphics g, Image imageOld, Image imageNew, int width, int height, float animate) { 22 | renderImageOld(component, g.create(), imageOld, width, height, animate); 23 | renderImageNew(component, g.create(), imageNew, width, height, animate); 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/raven/resources/icon/dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/menu/email.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/menu/chart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/icon/refresh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/menu/calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/menu/dashboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/menu/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/menu/ui.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/components/Background.java: -------------------------------------------------------------------------------- 1 | package raven.components; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import com.formdev.flatlaf.ui.FlatUIUtils; 5 | import com.formdev.flatlaf.util.UIScale; 6 | import java.awt.BorderLayout; 7 | import java.awt.Graphics; 8 | import java.awt.Graphics2D; 9 | import javax.swing.JPanel; 10 | 11 | /** 12 | * 13 | * @author Raven 14 | */ 15 | public class Background extends JPanel { 16 | 17 | private final boolean udecorated; 18 | 19 | public Background(boolean udecorated) { 20 | this.udecorated=udecorated; 21 | init(); 22 | } 23 | 24 | private void init() { 25 | setOpaque(!udecorated); 26 | setLayout(new BorderLayout()); 27 | putClientProperty(FlatClientProperties.STYLE, "" 28 | + "border:5,5,5,5;" 29 | + "background:$Drawer.background"); 30 | } 31 | 32 | @Override 33 | protected void paintComponent(Graphics g) { 34 | if (udecorated) { 35 | Graphics2D g2 = (Graphics2D) g.create(); 36 | FlatUIUtils.setRenderingHints(g2); 37 | int arc = UIScale.scale(30); 38 | g2.setColor(getBackground()); 39 | FlatUIUtils.paintComponentBackground(g2, 0, 0, getWidth(), getHeight(), 0, arc); 40 | g2.dispose(); 41 | } 42 | super.paintComponent(g); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/raven/resources/menu/chat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/menu/Menu.java: -------------------------------------------------------------------------------- 1 | package raven.menu; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import java.awt.event.MouseAdapter; 5 | import java.awt.event.MouseEvent; 6 | import javax.swing.JPanel; 7 | import javax.swing.SwingUtilities; 8 | import net.miginfocom.swing.MigLayout; 9 | import raven.drawer.component.DrawerBuilder; 10 | import raven.drawer.component.DrawerPanel; 11 | 12 | /** 13 | * 14 | * @author Raven 15 | */ 16 | public class Menu extends JPanel { 17 | 18 | private final DrawerBuilder drawerBuilder; 19 | 20 | public DrawerBuilder getDrawerBuilder() { 21 | return drawerBuilder; 22 | } 23 | 24 | public Menu(DrawerBuilder drawerBuilder) { 25 | this.drawerBuilder = drawerBuilder; 26 | init(); 27 | } 28 | 29 | private void init() { 30 | putClientProperty(FlatClientProperties.STYLE, "" 31 | + "background:$Drawer.background"); 32 | 33 | setLayout(new MigLayout("wrap,fill", "[fill," + drawerBuilder.getDrawerWidth() + "!]", "[fill]")); 34 | addMouseListener(new MouseAdapter() { 35 | @Override 36 | public void mousePressed(MouseEvent e) { 37 | if (SwingUtilities.isLeftMouseButton(e)) { 38 | FormManager.hideMenu(); 39 | } 40 | } 41 | }); 42 | DrawerPanel drawerPanel = new DrawerPanel(drawerBuilder); 43 | drawerPanel.addMouseListener(new MouseAdapter() { 44 | }); 45 | drawerBuilder.build(drawerPanel); 46 | add(drawerPanel); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/raven/resources/icon/light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/resources/menu/page.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/raven/application/Application.java: -------------------------------------------------------------------------------- 1 | package raven.application; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import com.formdev.flatlaf.FlatLaf; 5 | import com.formdev.flatlaf.fonts.roboto.FlatRobotoFont; 6 | import com.formdev.flatlaf.themes.FlatMacDarkLaf; 7 | import com.formdev.flatlaf.util.UIScale; 8 | import java.awt.Color; 9 | import java.awt.Dimension; 10 | import java.awt.EventQueue; 11 | import java.awt.Font; 12 | import javax.swing.JFrame; 13 | import javax.swing.UIManager; 14 | import raven.components.Background; 15 | import raven.forms.DashboardForm; 16 | import raven.menu.FormManager; 17 | import raven.popup.GlassPanePopup; 18 | 19 | /** 20 | * 21 | * @author Raven 22 | */ 23 | public class Application extends JFrame { 24 | 25 | private final boolean UNDECORATED = !true; 26 | 27 | public Application() { 28 | init(); 29 | } 30 | 31 | private void init() { 32 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 33 | setSize(UIScale.scale(new Dimension(1366, 768))); 34 | setLocationRelativeTo(null); 35 | if (UNDECORATED) { 36 | setUndecorated(UNDECORATED); 37 | setBackground(new Color(0, 0, 0, 0)); 38 | } else { 39 | getRootPane().putClientProperty(FlatClientProperties.FULL_WINDOW_CONTENT, true); 40 | } 41 | setContentPane(new Background(UNDECORATED)); 42 | // applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); 43 | GlassPanePopup.install(this); 44 | FormManager.install(this, UNDECORATED); 45 | FormManager.showForm(new DashboardForm()); 46 | FormManager.logout(); 47 | // applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); 48 | } 49 | 50 | public static void main(String[] args) { 51 | FlatRobotoFont.install(); 52 | FlatLaf.registerCustomDefaultsSource("raven.themes"); 53 | UIManager.put("defaultFont", new Font(FlatRobotoFont.FAMILY, Font.PLAIN, 13)); 54 | FlatMacDarkLaf.setup(); 55 | EventQueue.invokeLater(() -> new Application().setVisible(true)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/raven/forms/InboxForm.java: -------------------------------------------------------------------------------- 1 | package raven.forms; 2 | 3 | import raven.components.SimpleForm; 4 | import raven.menu.FormManager; 5 | 6 | /** 7 | * 8 | * @author Raven 9 | */ 10 | public class InboxForm extends SimpleForm { 11 | 12 | public InboxForm() { 13 | initComponents(); 14 | } 15 | 16 | @SuppressWarnings("unchecked") 17 | // //GEN-BEGIN:initComponents 18 | private void initComponents() { 19 | 20 | jButton1 = new javax.swing.JButton(); 21 | 22 | jButton1.setText("Show Another Form"); 23 | jButton1.addActionListener(new java.awt.event.ActionListener() { 24 | public void actionPerformed(java.awt.event.ActionEvent evt) { 25 | jButton1ActionPerformed(evt); 26 | } 27 | }); 28 | 29 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 30 | this.setLayout(layout); 31 | layout.setHorizontalGroup( 32 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 33 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 34 | .addContainerGap(660, Short.MAX_VALUE) 35 | .addComponent(jButton1) 36 | .addGap(88, 88, 88)) 37 | ); 38 | layout.setVerticalGroup( 39 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 40 | .addGroup(layout.createSequentialGroup() 41 | .addGap(119, 119, 119) 42 | .addComponent(jButton1) 43 | .addContainerGap(310, Short.MAX_VALUE)) 44 | ); 45 | }// //GEN-END:initComponents 46 | 47 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 48 | FormManager.showForm(new DashboardForm()); 49 | }//GEN-LAST:event_jButton1ActionPerformed 50 | 51 | // Variables declaration - do not modify//GEN-BEGIN:variables 52 | private javax.swing.JButton jButton1; 53 | // End of variables declaration//GEN-END:variables 54 | } 55 | -------------------------------------------------------------------------------- /src/raven/forms/InboxForm.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 | -------------------------------------------------------------------------------- /src/raven/utils/UndoRedo.java: -------------------------------------------------------------------------------- 1 | package raven.utils; 2 | 3 | import java.util.Iterator; 4 | import java.util.Stack; 5 | 6 | /** 7 | * 8 | * @author Raven 9 | * @param 10 | */ 11 | public class UndoRedo implements Iterable { 12 | 13 | private final Stack stack1; 14 | private final Stack stack2; 15 | 16 | public UndoRedo() { 17 | stack1 = new Stack<>(); 18 | stack2 = new Stack<>(); 19 | } 20 | 21 | public void add(E item) { 22 | stack1.push(item); 23 | stack2.clear(); 24 | } 25 | 26 | public E undo() { 27 | if (stack1.size() > 1) { 28 | stack2.push(stack1.pop()); 29 | return stack1.get(stack1.size() - 1); 30 | } else { 31 | return null; 32 | } 33 | } 34 | 35 | public E redo() { 36 | if (!stack2.isEmpty()) { 37 | E item = stack2.pop(); 38 | stack1.push(item); 39 | return item; 40 | } else { 41 | return null; 42 | } 43 | } 44 | 45 | public E getCurrent() { 46 | if (stack1.isEmpty()) { 47 | return null; 48 | } else { 49 | return stack1.get(stack1.size() - 1); 50 | } 51 | } 52 | 53 | public boolean isUndoAble() { 54 | return stack1.size() > 1; 55 | } 56 | 57 | public boolean isRedoAble() { 58 | return !stack2.empty(); 59 | } 60 | 61 | public void clear() { 62 | stack1.clear(); 63 | stack2.clear(); 64 | } 65 | 66 | public void clearRedo() { 67 | stack2.clear(); 68 | } 69 | 70 | @Override 71 | public Iterator iterator() { 72 | return new MyIterator(); 73 | } 74 | 75 | private class MyIterator implements Iterator { 76 | 77 | private int index = 0; 78 | 79 | @Override 80 | public boolean hasNext() { 81 | if (index < stack1.size()) { 82 | return true; 83 | } else if (index < stack1.size() + stack2.size()) { 84 | return true; 85 | } else { 86 | return false; 87 | } 88 | } 89 | 90 | @Override 91 | public E next() { 92 | if (index < stack1.size()) { 93 | return stack1.elementAt(index++); 94 | } else { 95 | return stack2.elementAt((index++) - stack1.size()); 96 | } 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /test/test/Test.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import com.formdev.flatlaf.themes.FlatMacLightLaf; 4 | 5 | /** 6 | * 7 | * @author RAVEN 8 | */ 9 | public class Test extends javax.swing.JFrame { 10 | 11 | /** 12 | * Creates new form Test 13 | */ 14 | public Test() { 15 | initComponents(); 16 | } 17 | 18 | /** 19 | * This method is called from within the constructor to initialize the form. 20 | * WARNING: Do NOT modify this code. The content of this method is always 21 | * regenerated by the Form Editor. 22 | */ 23 | @SuppressWarnings("unchecked") 24 | // //GEN-BEGIN:initComponents 25 | private void initComponents() { 26 | 27 | dateChooser1 = new com.raven.datechooser.DateChooser(); 28 | jTextField1 = new javax.swing.JTextField(); 29 | 30 | dateChooser1.setTextField(jTextField1); 31 | 32 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 33 | 34 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 35 | getContentPane().setLayout(layout); 36 | layout.setHorizontalGroup( 37 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 38 | .addGroup(layout.createSequentialGroup() 39 | .addGap(237, 237, 237) 40 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE) 41 | .addContainerGap(269, Short.MAX_VALUE)) 42 | ); 43 | layout.setVerticalGroup( 44 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 45 | .addGroup(layout.createSequentialGroup() 46 | .addGap(227, 227, 227) 47 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 48 | .addContainerGap(256, Short.MAX_VALUE)) 49 | ); 50 | 51 | pack(); 52 | setLocationRelativeTo(null); 53 | }// //GEN-END:initComponents 54 | 55 | /** 56 | * @param args the command line arguments 57 | */ 58 | public static void main(String args[]) { 59 | FlatMacLightLaf.setup(); 60 | java.awt.EventQueue.invokeLater(new Runnable() { 61 | public void run() { 62 | new Test().setVisible(true); 63 | } 64 | }); 65 | } 66 | 67 | // Variables declaration - do not modify//GEN-BEGIN:variables 68 | private com.raven.datechooser.DateChooser dateChooser1; 69 | private javax.swing.JTextField jTextField1; 70 | // End of variables declaration//GEN-END:variables 71 | } 72 | -------------------------------------------------------------------------------- /test/test/Test.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
57 | -------------------------------------------------------------------------------- /src/raven/login/Login.java: -------------------------------------------------------------------------------- 1 | package raven.login; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import javax.swing.JButton; 5 | import javax.swing.JCheckBox; 6 | import javax.swing.JLabel; 7 | import javax.swing.JPanel; 8 | import javax.swing.JPasswordField; 9 | import javax.swing.JTextField; 10 | import net.miginfocom.swing.MigLayout; 11 | import raven.menu.FormManager; 12 | import raven.model.ModelUser; 13 | 14 | /** 15 | * 16 | * @author Raven 17 | */ 18 | public class Login extends JPanel { 19 | 20 | public Login() { 21 | init(); 22 | } 23 | 24 | private void init() { 25 | setLayout(new MigLayout("fill,insets 20", "[center]", "[center]")); 26 | txtUsername = new JTextField(); 27 | txtPassword = new JPasswordField(); 28 | chRememberMe = new JCheckBox("Remember me"); 29 | cmdLogin = new JButton("Login"); 30 | JPanel panel = new JPanel(new MigLayout("wrap,fillx,insets 35 45 30 45", "fill,250:280")); 31 | panel.putClientProperty(FlatClientProperties.STYLE, "" 32 | + "arc:20;" 33 | + "[light]background:darken(@background,3%);" 34 | + "[dark]background:lighten(@background,3%)"); 35 | 36 | txtPassword.putClientProperty(FlatClientProperties.STYLE, "" 37 | + "showRevealButton:true"); 38 | cmdLogin.putClientProperty(FlatClientProperties.STYLE, "" 39 | + "[light]background:darken(@background,10%);" 40 | + "[dark]background:lighten(@background,10%);" 41 | + "borderWidth:0;" 42 | + "focusWidth:0;" 43 | + "innerFocusWidth:0"); 44 | 45 | txtUsername.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Enter your username or email"); 46 | txtPassword.putClientProperty(FlatClientProperties.PLACEHOLDER_TEXT, "Enter your password"); 47 | 48 | JLabel lbTitle = new JLabel("Welcome back!"); 49 | JLabel description = new JLabel("Please sign in to access your account"); 50 | lbTitle.putClientProperty(FlatClientProperties.STYLE, "" 51 | + "font:bold +10"); 52 | description.putClientProperty(FlatClientProperties.STYLE, "" 53 | + "[light]foreground:lighten(@foreground,30%);" 54 | + "[dark]foreground:darken(@foreground,30%)"); 55 | 56 | panel.add(lbTitle); 57 | panel.add(description); 58 | panel.add(new JLabel("Username"), "gapy 8"); 59 | panel.add(txtUsername); 60 | panel.add(new JLabel("Password"), "gapy 8"); 61 | panel.add(txtPassword); 62 | panel.add(chRememberMe, "grow 0"); 63 | panel.add(cmdLogin, "gapy 10"); 64 | add(panel); 65 | 66 | // event 67 | cmdLogin.addActionListener((e) -> { 68 | String userName = txtUsername.getText().trim(); 69 | // this is just for example to check admin user :) 70 | boolean isAdmin = userName.equals("admin"); 71 | FormManager.login(new ModelUser(userName, isAdmin)); 72 | }); 73 | } 74 | 75 | private JTextField txtUsername; 76 | private JPasswordField txtPassword; 77 | private JCheckBox chRememberMe; 78 | private JButton cmdLogin; 79 | } 80 | -------------------------------------------------------------------------------- /src/raven/menu/ThemesChange.java: -------------------------------------------------------------------------------- 1 | package raven.menu; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import com.formdev.flatlaf.FlatLaf; 5 | import com.formdev.flatlaf.extras.FlatAnimatedLafChange; 6 | import com.formdev.flatlaf.extras.FlatSVGIcon; 7 | import com.formdev.flatlaf.themes.FlatMacDarkLaf; 8 | import com.formdev.flatlaf.themes.FlatMacLightLaf; 9 | import java.awt.Color; 10 | import java.awt.EventQueue; 11 | import javax.swing.Icon; 12 | import javax.swing.JButton; 13 | import javax.swing.JPanel; 14 | import net.miginfocom.swing.MigLayout; 15 | 16 | /** 17 | * 18 | * @author Raven 19 | */ 20 | public class ThemesChange extends JPanel { 21 | 22 | public ThemesChange() { 23 | init(); 24 | } 25 | 26 | private Icon createIcon(String path) { 27 | FlatSVGIcon icon = new FlatSVGIcon(path, 0.7f); 28 | FlatSVGIcon.ColorFilter colorFilter = new FlatSVGIcon.ColorFilter(); 29 | colorFilter.add(Color.decode("#969696"), Color.decode("#FAFAFA"), Color.decode("#969696")); 30 | icon.setColorFilter(colorFilter); 31 | return icon; 32 | } 33 | 34 | private void init() { 35 | putClientProperty(FlatClientProperties.STYLE, "" 36 | + "background:null"); 37 | setLayout(new MigLayout("al center", "[fill,200]", "fill")); 38 | JPanel panel = new JPanel(new MigLayout("fill", "[fill]10[fill]", "fill")); 39 | panel.putClientProperty(FlatClientProperties.STYLE, "" 40 | + "arc:999;" 41 | + "background:darken($Drawer.background,5%)"); 42 | JButton buttonLight = new JButton(createIcon("raven/resources/icon/light.svg")); 43 | JButton buttonDark = new JButton(createIcon("raven/resources/icon/dark.svg")); 44 | buttonLight.addActionListener(e -> changeMode(false)); 45 | buttonDark.addActionListener(e -> changeMode(true)); 46 | buttonLight.putClientProperty(FlatClientProperties.STYLE, "" 47 | + "arc:999;" 48 | + "[dark]background:null;" 49 | + "[light]background:$Drawer.background;" 50 | + "borderWidth:0;" 51 | + "focusWidth:0;" 52 | + "innerFocusWidth:0;" 53 | + "margin:3,5,3,5"); 54 | 55 | buttonDark.putClientProperty(FlatClientProperties.STYLE, "" 56 | + "arc:999;" 57 | + "[dark]background:$Drawer.background;" 58 | + "[light]background:null;" 59 | + "borderWidth:0;" 60 | + "focusWidth:0;" 61 | + "innerFocusWidth:0;" 62 | + "margin:3,5,3,5"); 63 | panel.add(buttonDark); 64 | panel.add(buttonLight); 65 | add(panel); 66 | } 67 | 68 | private void changeMode(boolean dark) { 69 | if (dark != FlatLaf.isLafDark()) { 70 | if (dark) { 71 | EventQueue.invokeLater(() -> { 72 | FlatAnimatedLafChange.showSnapshot(); 73 | FlatMacDarkLaf.setup(); 74 | FlatLaf.updateUI(); 75 | FormManager.updateTempFormUI(); 76 | FlatAnimatedLafChange.hideSnapshotWithAnimation(); 77 | }); 78 | } else { 79 | EventQueue.invokeLater(() -> { 80 | FlatAnimatedLafChange.showSnapshot(); 81 | FlatMacLightLaf.setup(); 82 | FlatLaf.updateUI(); 83 | FormManager.updateTempFormUI(); 84 | FlatAnimatedLafChange.hideSnapshotWithAnimation(); 85 | }); 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/raven/utils/DateCalculator.java: -------------------------------------------------------------------------------- 1 | package raven.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Calendar; 5 | import java.util.Date; 6 | import java.util.concurrent.TimeUnit; 7 | 8 | /** 9 | * 10 | * @author Raven 11 | */ 12 | public class DateCalculator { 13 | 14 | public Date getDateStart() { 15 | return dateStart; 16 | } 17 | 18 | public void setDateStart(Date dateStart) { 19 | this.dateStart = dateStart; 20 | } 21 | 22 | public Date getDateEnd() { 23 | return dateEnd; 24 | } 25 | 26 | public void setDateEnd(Date dateEnd) { 27 | this.dateEnd = dateEnd; 28 | } 29 | 30 | public DateCalculator(Date dateStart, Date dateEnd) { 31 | this.dateStart = dateStart; 32 | this.dateEnd = dateEnd; 33 | } 34 | 35 | public DateCalculator() { 36 | } 37 | 38 | private Date dateStart; 39 | private Date dateEnd; 40 | 41 | public String getTextSearch() { 42 | ModelDate start = new ModelDate(dateStart); 43 | ModelDate end = new ModelDate(dateEnd); 44 | String date; 45 | if (start.year != end.year) { 46 | date = start.toString() + " - " + end.toString(); 47 | } else if (start.month != end.month) { 48 | date = start.toStringNoYear() + " - " + end.toString(); 49 | } else if (start.getDay() != end.getDay()) { 50 | date = start.toStringNoYear() + " - " + end.toStringNoMonth(); 51 | } else { 52 | date = start.toString(); 53 | } 54 | return date; 55 | } 56 | 57 | public long getDifferenceDays() { 58 | long diff = dateEnd.getTime() - dateStart.getTime(); 59 | return TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS); 60 | } 61 | 62 | private class ModelDate { 63 | 64 | public Date getDate() { 65 | return date; 66 | } 67 | 68 | public void setDate(Date date) { 69 | this.date = date; 70 | } 71 | 72 | public int getDay() { 73 | return day; 74 | } 75 | 76 | public void setDay(int day) { 77 | this.day = day; 78 | } 79 | 80 | public int getMonth() { 81 | return month; 82 | } 83 | 84 | public void setMonth(int month) { 85 | this.month = month; 86 | } 87 | 88 | public int getYear() { 89 | return year; 90 | } 91 | 92 | public void setYear(int year) { 93 | this.year = year; 94 | } 95 | 96 | public ModelDate(Date date) { 97 | this.date = date; 98 | Calendar cal = Calendar.getInstance(); 99 | cal.setTime(date); 100 | day = cal.get(Calendar.DATE); 101 | month = cal.get(Calendar.MONTH) + 1; 102 | year = cal.get(Calendar.YEAR); 103 | } 104 | 105 | private Date date; 106 | private int day; 107 | private int month; 108 | private int year; 109 | 110 | @Override 111 | public String toString() { 112 | SimpleDateFormat df = new SimpleDateFormat("dd MMM, yyyy"); 113 | return df.format(date); 114 | } 115 | 116 | public String toStringNoYear() { 117 | SimpleDateFormat df = new SimpleDateFormat("dd MMM"); 118 | return df.format(date); 119 | } 120 | 121 | public String toStringNoMonth() { 122 | SimpleDateFormat df = new SimpleDateFormat("dd, yyyy"); 123 | return df.format(date); 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/raven/components/MainForm.java: -------------------------------------------------------------------------------- 1 | package raven.components; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import com.formdev.flatlaf.extras.FlatSVGIcon; 5 | import java.awt.Component; 6 | import javax.swing.Icon; 7 | import javax.swing.JButton; 8 | import javax.swing.JPanel; 9 | import javax.swing.JScrollPane; 10 | import net.miginfocom.swing.MigLayout; 11 | import raven.menu.FormManager; 12 | import raven.swing.slider.PanelSlider; 13 | import raven.swing.slider.SimpleTransition; 14 | import raven.swing.slider.SliderTransition; 15 | 16 | /** 17 | * 18 | * @author Raven 19 | */ 20 | public class MainForm extends JPanel { 21 | 22 | private final boolean undecorated; 23 | 24 | public MainForm(boolean undecorated) { 25 | this.undecorated = undecorated; 26 | init(); 27 | } 28 | 29 | private void init() { 30 | if (undecorated) { 31 | putClientProperty(FlatClientProperties.STYLE, "" 32 | + "border:5,5,5,5;" 33 | + "arc:30"); 34 | } 35 | setLayout(new MigLayout("wrap,fillx", "[fill]", "")); 36 | header = createHeader(); 37 | panelSlider = new PanelSlider(); 38 | JScrollPane scroll = new JScrollPane(panelSlider); 39 | scroll.putClientProperty(FlatClientProperties.STYLE, "" 40 | + "border:0,0,0,0"); 41 | scroll.getVerticalScrollBar().putClientProperty(FlatClientProperties.STYLE, "" 42 | + "trackArc:999;" 43 | + "width:10"); 44 | scroll.getVerticalScrollBar().setUnitIncrement(10); 45 | add(header); 46 | add(scroll); 47 | } 48 | 49 | private JPanel createHeader() { 50 | JPanel panel = new JPanel(new MigLayout("insets 3")); 51 | panel.putClientProperty(FlatClientProperties.STYLE, "" 52 | + "background:null"); 53 | 54 | cmdMenu = createButton(new FlatSVGIcon("raven/resources/icon/menu.svg")); 55 | cmdUndo = createButton(new FlatSVGIcon("raven/resources/icon/undo.svg")); 56 | cmdRedo = createButton(new FlatSVGIcon("raven/resources/icon/redo.svg")); 57 | cmdRefresh = createButton(new FlatSVGIcon("raven/resources/icon/refresh.svg")); 58 | cmdMenu.addActionListener(e -> { 59 | FormManager.showMenu(); 60 | }); 61 | cmdUndo.addActionListener(e -> { 62 | FormManager.undo(); 63 | }); 64 | cmdRedo.addActionListener(e -> { 65 | FormManager.redo(); 66 | }); 67 | cmdRefresh.addActionListener(e -> { 68 | FormManager.refresh(); 69 | }); 70 | 71 | panel.add(cmdMenu); 72 | panel.add(cmdUndo); 73 | panel.add(cmdRedo); 74 | panel.add(cmdRefresh); 75 | return panel; 76 | } 77 | 78 | private JButton createButton(Icon icon) { 79 | JButton button = new JButton(icon); 80 | button.putClientProperty(FlatClientProperties.STYLE, "" 81 | + "background:$Button.toolbar.background;" 82 | + "arc:10;" 83 | + "margin:3,3,3,3;" 84 | + "borderWidth:0;" 85 | + "focusWidth:0;" 86 | + "innerFocusWidth:0"); 87 | return button; 88 | } 89 | 90 | public void showForm(Component component, SliderTransition transition) { 91 | checkButton(); 92 | panelSlider.addSlide(component, transition); 93 | revalidate(); 94 | } 95 | 96 | public void showForm(Component component) { 97 | showForm(component, SimpleTransition.getDefaultTransition(false)); 98 | } 99 | 100 | public void setForm(Component component) { 101 | checkButton(); 102 | panelSlider.addSlide(component, null); 103 | } 104 | 105 | private void checkButton() { 106 | cmdUndo.setEnabled(FormManager.getForms().isUndoAble()); 107 | cmdRedo.setEnabled(FormManager.getForms().isRedoAble()); 108 | cmdRefresh.setEnabled(FormManager.getForms().getCurrent() != null); 109 | } 110 | 111 | private JPanel header; 112 | private JButton cmdMenu; 113 | private JButton cmdUndo; 114 | private JButton cmdRedo; 115 | private JButton cmdRefresh; 116 | private PanelSlider panelSlider; 117 | } 118 | -------------------------------------------------------------------------------- /src/raven/forms/ReadForm.java: -------------------------------------------------------------------------------- 1 | package raven.forms; 2 | 3 | import raven.components.SimpleForm; 4 | import raven.menu.FormManager; 5 | 6 | /** 7 | * 8 | * @author RAVEN 9 | */ 10 | public class ReadForm extends SimpleForm { 11 | 12 | /** 13 | * Creates new form ReadForm 14 | */ 15 | public ReadForm() { 16 | initComponents(); 17 | } 18 | 19 | /** 20 | * This method is called from within the constructor to initialize the form. 21 | * WARNING: Do NOT modify this code. The content of this method is always 22 | * regenerated by the Form Editor. 23 | */ 24 | @SuppressWarnings("unchecked") 25 | // //GEN-BEGIN:initComponents 26 | private void initComponents() { 27 | 28 | dateChooser1 = new com.raven.datechooser.DateChooser(); 29 | jScrollPane1 = new javax.swing.JScrollPane(); 30 | jTable1 = new javax.swing.JTable(); 31 | jButton1 = new javax.swing.JButton(); 32 | jTextField1 = new javax.swing.JTextField(); 33 | 34 | dateChooser1.setTextField(jTextField1); 35 | 36 | jTable1.setModel(new javax.swing.table.DefaultTableModel( 37 | new Object [][] { 38 | {null, null, null, null}, 39 | {null, null, null, null}, 40 | {null, null, null, null}, 41 | {null, null, null, null} 42 | }, 43 | new String [] { 44 | "Title 1", "Title 2", "Title 3", "Title 4" 45 | } 46 | )); 47 | jScrollPane1.setViewportView(jTable1); 48 | 49 | jButton1.setText("Show Inbox Form"); 50 | jButton1.addActionListener(new java.awt.event.ActionListener() { 51 | public void actionPerformed(java.awt.event.ActionEvent evt) { 52 | jButton1ActionPerformed(evt); 53 | } 54 | }); 55 | 56 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 57 | this.setLayout(layout); 58 | layout.setHorizontalGroup( 59 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 60 | .addGroup(layout.createSequentialGroup() 61 | .addGap(88, 88, 88) 62 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 63 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 64 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 65 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE) 66 | .addComponent(jButton1)) 67 | .addContainerGap(80, Short.MAX_VALUE)) 68 | ); 69 | layout.setVerticalGroup( 70 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 71 | .addGroup(layout.createSequentialGroup() 72 | .addGap(73, 73, 73) 73 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 74 | .addGroup(layout.createSequentialGroup() 75 | .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 76 | .addGap(18, 18, 18) 77 | .addComponent(jButton1)) 78 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 79 | .addContainerGap(104, Short.MAX_VALUE)) 80 | ); 81 | }// //GEN-END:initComponents 82 | 83 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 84 | FormManager.showForm(new InboxForm()); 85 | }//GEN-LAST:event_jButton1ActionPerformed 86 | 87 | 88 | // Variables declaration - do not modify//GEN-BEGIN:variables 89 | private com.raven.datechooser.DateChooser dateChooser1; 90 | private javax.swing.JButton jButton1; 91 | private javax.swing.JScrollPane jScrollPane1; 92 | private javax.swing.JTable jTable1; 93 | private javax.swing.JTextField jTextField1; 94 | // End of variables declaration//GEN-END:variables 95 | } 96 | -------------------------------------------------------------------------------- /nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processors.list= 4 | annotation.processing.run.all.processors=true 5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 6 | application.title=flatlaf-dashboard-pro 7 | application.vendor=RAVEN 8 | build.classes.dir=${build.dir}/classes 9 | build.classes.excludes=**/*.java,**/*.form 10 | # This directory is removed when the project is cleaned: 11 | build.dir=build 12 | build.generated.dir=${build.dir}/generated 13 | build.generated.sources.dir=${build.dir}/generated-sources 14 | # Only compile against the classpath explicitly listed here: 15 | build.sysclasspath=ignore 16 | build.test.classes.dir=${build.dir}/test/classes 17 | build.test.results.dir=${build.dir}/test/results 18 | # Uncomment to specify the preferred debugger connection transport: 19 | #debug.transport=dt_socket 20 | debug.classpath=\ 21 | ${run.classpath} 22 | debug.modulepath=\ 23 | ${run.modulepath} 24 | debug.test.classpath=\ 25 | ${run.test.classpath} 26 | debug.test.modulepath=\ 27 | ${run.test.modulepath} 28 | # Files in build.classes.dir which should be excluded from distribution jar 29 | dist.archive.excludes= 30 | # This directory is removed when the project is cleaned: 31 | dist.dir=dist 32 | dist.jar=${dist.dir}/flatlaf-dashboard-pro.jar 33 | dist.javadoc.dir=${dist.dir}/javadoc 34 | dist.jlink.dir=${dist.dir}/jlink 35 | dist.jlink.output=${dist.jlink.dir}/flatlaf-dashboard-pro 36 | endorsed.classpath= 37 | excludes= 38 | file.reference.datechooser-swing-1.4.1.jar=library\\datechooser-swing-1.4.1.jar 39 | file.reference.flatlaf-3.4.1.jar=library\\flatlaf-3.4.1.jar 40 | file.reference.flatlaf-extras-3.4.1.jar=library\\flatlaf-extras-3.4.1.jar 41 | file.reference.flatlaf-fonts-roboto-2.137.jar=library\\flatlaf-fonts-roboto-2.137.jar 42 | file.reference.jsvg-1.4.0.jar=library\\jsvg-1.4.0.jar 43 | file.reference.miglayout-core.jar=library\\miglayout-core.jar 44 | file.reference.miglayout-swing.jar=library\\miglayout-swing.jar 45 | file.reference.swing-chart-1.1.0-beta.jar=library\\swing-chart-1.1.0-beta.jar 46 | file.reference.swing-glasspane-popup-1.5.1.jar=library\\swing-glasspane-popup-1.5.1.jar 47 | includes=** 48 | jar.compress=false 49 | javac.classpath=\ 50 | ${file.reference.flatlaf-fonts-roboto-2.137.jar}:\ 51 | ${file.reference.miglayout-core.jar}:\ 52 | ${file.reference.miglayout-swing.jar}:\ 53 | ${file.reference.swing-chart-1.1.0-beta.jar}:\ 54 | ${file.reference.flatlaf-3.4.1.jar}:\ 55 | ${file.reference.flatlaf-extras-3.4.1.jar}:\ 56 | ${file.reference.jsvg-1.4.0.jar}:\ 57 | ${file.reference.datechooser-swing-1.4.1.jar}:\ 58 | ${file.reference.swing-glasspane-popup-1.5.1.jar} 59 | # Space-separated list of extra javac options 60 | javac.compilerargs= 61 | javac.deprecation=false 62 | javac.external.vm=true 63 | javac.modulepath= 64 | javac.processormodulepath= 65 | javac.processorpath=\ 66 | ${javac.classpath} 67 | javac.source=1.8 68 | javac.target=1.8 69 | javac.test.classpath=\ 70 | ${javac.classpath}:\ 71 | ${build.classes.dir} 72 | javac.test.modulepath=\ 73 | ${javac.modulepath} 74 | javac.test.processorpath=\ 75 | ${javac.test.classpath} 76 | javadoc.additionalparam= 77 | javadoc.author=false 78 | javadoc.encoding=${source.encoding} 79 | javadoc.html5=false 80 | javadoc.noindex=false 81 | javadoc.nonavbar=false 82 | javadoc.notree=false 83 | javadoc.private=false 84 | javadoc.splitindex=true 85 | javadoc.use=true 86 | javadoc.version=false 87 | javadoc.windowtitle= 88 | # The jlink additional root modules to resolve 89 | jlink.additionalmodules= 90 | # The jlink additional command line parameters 91 | jlink.additionalparam= 92 | jlink.launcher=true 93 | jlink.launcher.name=flatlaf-dashboard-pro 94 | main.class=raven.application.Application 95 | manifest.file=manifest.mf 96 | meta.inf.dir=${src.dir}/META-INF 97 | mkdist.disabled=false 98 | platform.active=default_platform 99 | run.classpath=\ 100 | ${javac.classpath}:\ 101 | ${build.classes.dir} 102 | # Space-separated list of JVM arguments used when running the project. 103 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 104 | # To set system properties for unit tests define test-sys-prop.name=value: 105 | run.jvmargs= 106 | run.modulepath=\ 107 | ${javac.modulepath} 108 | run.test.classpath=\ 109 | ${javac.test.classpath}:\ 110 | ${build.test.classes.dir} 111 | run.test.modulepath=\ 112 | ${javac.test.modulepath} 113 | source.encoding=UTF-8 114 | src.dir=src 115 | test.src.dir=test 116 | -------------------------------------------------------------------------------- /src/raven/forms/ReadForm.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
74 |
75 |
76 |
77 |
78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |
90 |
91 | -------------------------------------------------------------------------------- /src/raven/menu/FormManager.java: -------------------------------------------------------------------------------- 1 | package raven.menu; 2 | 3 | import com.formdev.flatlaf.extras.FlatAnimatedLafChange; 4 | import java.awt.Image; 5 | import javax.swing.JFrame; 6 | import javax.swing.SwingUtilities; 7 | import raven.components.MainForm; 8 | import raven.components.SimpleForm; 9 | import raven.login.Login; 10 | import raven.model.ModelUser; 11 | import raven.swing.slider.PanelSlider; 12 | import raven.swing.slider.SimpleTransition; 13 | import raven.utils.UndoRedo; 14 | 15 | /** 16 | * 17 | * @author Raven 18 | */ 19 | public class FormManager { 20 | 21 | private static FormManager instance; 22 | private final JFrame frame; 23 | 24 | private final UndoRedo forms = new UndoRedo<>(); 25 | 26 | private boolean menuShowing = true; 27 | private final PanelSlider panelSlider; 28 | private final MainForm mainForm; 29 | private final Menu menu; 30 | private final boolean undecorated; 31 | 32 | public static void install(JFrame frame, boolean undecorated) { 33 | instance = new FormManager(frame, undecorated); 34 | } 35 | 36 | private FormManager(JFrame frame, boolean undecorated) { 37 | this.frame = frame; 38 | panelSlider = new PanelSlider(); 39 | mainForm = new MainForm(undecorated); 40 | menu = new Menu(new MyDrawerBuilder()); 41 | this.undecorated = undecorated; 42 | } 43 | 44 | public static void showMenu() { 45 | instance.menuShowing = true; 46 | instance.panelSlider.addSlide(instance.menu, SimpleTransition.getShowMenuTransition(instance.menu.getDrawerBuilder().getDrawerWidth(), instance.undecorated)); 47 | } 48 | 49 | public static void showForm(SimpleForm component) { 50 | if (isNewFormAble()) { 51 | instance.forms.add(component); 52 | if (instance.menuShowing == true) { 53 | instance.menuShowing = false; 54 | Image oldImage = instance.panelSlider.createOldImage(); 55 | instance.mainForm.setForm(component); 56 | instance.panelSlider.addSlide(instance.mainForm, SimpleTransition.getSwitchFormTransition(oldImage, instance.menu.getDrawerBuilder().getDrawerWidth())); 57 | } else { 58 | instance.mainForm.showForm(component); 59 | } 60 | instance.forms.getCurrent().formInitAndOpen(); 61 | } 62 | } 63 | 64 | public static void logout() { 65 | FlatAnimatedLafChange.showSnapshot(); 66 | instance.frame.getContentPane().removeAll(); 67 | instance.frame.getContentPane().add(new Login()); 68 | instance.frame.repaint(); 69 | instance.frame.revalidate(); 70 | FlatAnimatedLafChange.hideSnapshotWithAnimation(); 71 | } 72 | 73 | public static void login(ModelUser user) { 74 | FlatAnimatedLafChange.showSnapshot(); 75 | instance.frame.getContentPane().removeAll(); 76 | instance.frame.getContentPane().add(instance.panelSlider); 77 | // set new user and rebuild menu for user role 78 | ((MyDrawerBuilder) instance.menu.getDrawerBuilder()).setUser(user); 79 | instance.frame.repaint(); 80 | instance.frame.revalidate(); 81 | FlatAnimatedLafChange.hideSnapshotWithAnimation(); 82 | } 83 | 84 | public static void hideMenu() { 85 | instance.menuShowing = false; 86 | instance.panelSlider.addSlide(instance.mainForm, SimpleTransition.getHideMenuTransition(instance.menu.getDrawerBuilder().getDrawerWidth(), instance.undecorated)); 87 | } 88 | 89 | public static void undo() { 90 | if (isNewFormAble()) { 91 | if (!instance.menuShowing && instance.forms.isUndoAble()) { 92 | instance.mainForm.showForm(instance.forms.undo(), SimpleTransition.getDefaultTransition(true)); 93 | instance.forms.getCurrent().formOpen(); 94 | } 95 | } 96 | } 97 | 98 | public static void redo() { 99 | if (isNewFormAble()) { 100 | if (!instance.menuShowing && instance.forms.isRedoAble()) { 101 | instance.mainForm.showForm(instance.forms.redo()); 102 | instance.forms.getCurrent().formOpen(); 103 | } 104 | } 105 | } 106 | 107 | public static void refresh() { 108 | if (!instance.menuShowing) { 109 | instance.forms.getCurrent().formRefresh(); 110 | } 111 | } 112 | 113 | public static UndoRedo getForms() { 114 | return instance.forms; 115 | } 116 | 117 | public static boolean isNewFormAble() { 118 | return instance.forms.getCurrent() == null || instance.forms.getCurrent().formClose(); 119 | } 120 | 121 | public static void updateTempFormUI() { 122 | for (SimpleForm f : instance.forms) { 123 | SwingUtilities.updateComponentTreeUI(f); 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/raven/swing/slider/PanelSlider.java: -------------------------------------------------------------------------------- 1 | package raven.swing.slider; 2 | 3 | import com.formdev.flatlaf.util.Animator; 4 | import com.formdev.flatlaf.util.CubicBezierEasing; 5 | import java.awt.CardLayout; 6 | import java.awt.Component; 7 | import java.awt.Graphics; 8 | import java.awt.Image; 9 | import java.awt.image.VolatileImage; 10 | import javax.swing.JComponent; 11 | import javax.swing.JLayeredPane; 12 | import javax.swing.SwingUtilities; 13 | 14 | /** 15 | * 16 | * @author Raven 17 | */ 18 | public class PanelSlider extends JLayeredPane { 19 | 20 | private PanelSnapshot panelSnapshot; 21 | private Component component; 22 | private Component oldComponent; 23 | 24 | public PanelSlider() { 25 | init(); 26 | } 27 | 28 | private void init() { 29 | setOpaque(true); 30 | panelSnapshot = new PanelSnapshot(); 31 | setLayout(new CardLayout()); 32 | setLayer(panelSnapshot, JLayeredPane.DRAG_LAYER); 33 | add(panelSnapshot); 34 | panelSnapshot.setVisible(false); 35 | } 36 | 37 | public void addSlide(Component component, SliderTransition transition) { 38 | component.applyComponentOrientation(getComponentOrientation()); 39 | if (this.component != null) { 40 | this.oldComponent = this.component; 41 | } 42 | this.component = component; 43 | if (oldComponent == null) { 44 | add(component); 45 | repaint(); 46 | revalidate(); 47 | component.setVisible(true); 48 | } else { 49 | add(component); 50 | if (transition != null) { 51 | doLayout(); 52 | // SwingUtilities.updateComponentTreeUI(component); 53 | SwingUtilities.invokeLater(() -> { 54 | Image oldImage = createImage(oldComponent); 55 | Image newImage = createImage(component); 56 | remove(oldComponent); 57 | panelSnapshot.animate(transition, oldImage, newImage); 58 | }); 59 | } else { 60 | component.setVisible(true); 61 | remove(oldComponent); 62 | revalidate(); 63 | repaint(); 64 | } 65 | } 66 | } 67 | 68 | public Image createImage(Component component) { 69 | boolean check = false; 70 | for (Component com : getComponents()) { 71 | if (com == component) { 72 | check = true; 73 | break; 74 | } 75 | } 76 | if (!check) { 77 | add(component); 78 | } 79 | VolatileImage snapshot = component.createVolatileImage(getWidth(), getHeight()); 80 | if (snapshot == null) { 81 | return null; 82 | } 83 | component.paint(snapshot.getGraphics()); 84 | if (!check) { 85 | remove(component); 86 | } 87 | return snapshot; 88 | } 89 | 90 | public Image createOldImage() { 91 | if (oldComponent != null) { 92 | return createImage(oldComponent); 93 | } 94 | return null; 95 | } 96 | 97 | private class PanelSnapshot extends JComponent { 98 | 99 | @Override 100 | public void updateUI() { 101 | super.updateUI(); 102 | if (sliderTransition != null && !sliderTransition.closeAfterAnimation()) { 103 | if (oldComponent != null) { 104 | SwingUtilities.updateComponentTreeUI(oldComponent); 105 | oldImage = PanelSlider.this.createImage(oldComponent); 106 | } 107 | } 108 | } 109 | 110 | private final Animator animator; 111 | private float animate; 112 | 113 | private SliderTransition sliderTransition; 114 | private Image oldImage; 115 | private Image newImage; 116 | 117 | public PanelSnapshot() { 118 | animator = new Animator(400, new Animator.TimingTarget() { 119 | @Override 120 | public void timingEvent(float v) { 121 | animate = v; 122 | repaint(); 123 | } 124 | 125 | @Override 126 | public void end() { 127 | if (sliderTransition.closeAfterAnimation()) { 128 | setVisible(false); 129 | oldImage.flush(); 130 | newImage.flush(); 131 | } 132 | component.setVisible(true); 133 | } 134 | }); 135 | animator.setInterpolator(CubicBezierEasing.EASE); 136 | } 137 | 138 | protected void animate(SliderTransition sliderTransition, Image oldImage, Image newImage) { 139 | if (animator.isRunning()) { 140 | animator.stop(); 141 | } 142 | this.oldImage = oldImage; 143 | this.newImage = newImage; 144 | this.sliderTransition = sliderTransition; 145 | this.animate = 0f; 146 | repaint(); 147 | setVisible(true); 148 | animator.start(); 149 | } 150 | 151 | @Override 152 | public void paint(Graphics g) { 153 | if (sliderTransition != null) { 154 | int width = getWidth(); 155 | int height = getHeight(); 156 | sliderTransition.render(this, g, oldImage, newImage, width, height, animate); 157 | } 158 | } 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /src/raven/swing/slider/SimpleTransition.java: -------------------------------------------------------------------------------- 1 | package raven.swing.slider; 2 | 3 | import com.formdev.flatlaf.ui.FlatUIUtils; 4 | import com.formdev.flatlaf.util.UIScale; 5 | import java.awt.AlphaComposite; 6 | import java.awt.Component; 7 | import java.awt.Graphics; 8 | import java.awt.Graphics2D; 9 | import java.awt.Image; 10 | import java.awt.Rectangle; 11 | import java.awt.RenderingHints; 12 | import java.awt.geom.Area; 13 | import java.awt.geom.RoundRectangle2D; 14 | import javax.swing.UIManager; 15 | 16 | /** 17 | * 18 | * @author Raven 19 | */ 20 | public class SimpleTransition { 21 | 22 | private static final float ZOOM_IN = 0.1f; 23 | 24 | public static SliderTransition getDefaultTransition(boolean toRight) { 25 | return new SliderTransition() { 26 | @Override 27 | public void renderImageOld(Component component, Graphics g, Image image, int width, int height, float animate) { 28 | g.drawImage(image, 0, 0, null); 29 | g.dispose(); 30 | } 31 | 32 | @Override 33 | public void renderImageNew(Component component, Graphics g, Image image, int width, int height, float animate) { 34 | Graphics2D g2 = (Graphics2D) g; 35 | int move = UIScale.scale(200); 36 | int x = (int) (move * (1f - animate)); 37 | if (toRight) { 38 | x = -x; 39 | } 40 | g2.setComposite(AlphaComposite.SrcOver.derive(animate)); 41 | g2.drawImage(image, x, 0, null); 42 | g2.dispose(); 43 | } 44 | }; 45 | } 46 | 47 | public static SliderTransition getShowMenuTransition(int drawerWidth, boolean undecorated) { 48 | 49 | return new SliderTransition() { 50 | 51 | @Override 52 | public void renderImageOld(Component component, Graphics g, Image image, int width, int height, float animate) { 53 | renderImage(component, g, image, width, height, drawerWidth, animate, undecorated); 54 | } 55 | 56 | @Override 57 | public void renderImageNew(Component component, Graphics g, Image image, int width, int height, float animate) { 58 | if (animate != 1) { 59 | g.drawImage(image, 0, 0, null); 60 | } 61 | g.dispose(); 62 | } 63 | 64 | @Override 65 | public boolean closeAfterAnimation() { 66 | return false; 67 | } 68 | 69 | @Override 70 | public void render(Component component, Graphics g, Image imageOld, Image imageNew, int width, int height, float animate) { 71 | renderImageNew(component, g.create(), imageNew, width, height, animate); 72 | renderImageOld(component, g.create(), imageOld, width, height, animate); 73 | } 74 | }; 75 | } 76 | 77 | public static SliderTransition getHideMenuTransition(int drawerWidth, boolean undecorated) { 78 | return new SliderTransition() { 79 | 80 | @Override 81 | public void renderImageOld(Component component, Graphics g, Image image, int width, int height, float animate) { 82 | if (animate != 1) { 83 | g.drawImage(image, 0, 0, null); 84 | } 85 | g.dispose(); 86 | } 87 | 88 | @Override 89 | public void renderImageNew(Component component, Graphics g, Image image, int width, int height, float animate) { 90 | renderImage(component, g, image, width, height, drawerWidth, 1f - animate, undecorated); 91 | } 92 | }; 93 | } 94 | 95 | public static SliderTransition getSwitchFormTransition(Image oldFormImage, int drawerWidth) { 96 | return new SliderTransition() { 97 | @Override 98 | public void renderImageOld(Component component, Graphics g, Image image, int width, int height, float animate) { 99 | g.drawImage(image, 0, 0, null); 100 | g.dispose(); 101 | } 102 | 103 | @Override 104 | public void renderImageNew(Component component, Graphics g, Image image, int width, int height, float animate) { 105 | float newAnimate = 1f - animate; 106 | Graphics2D g2 = (Graphics2D) g; 107 | FlatUIUtils.setRenderingHints(g2); 108 | float zoomIn = ZOOM_IN; 109 | boolean ltr = component.getComponentOrientation().isLeftToRight(); 110 | int x = (int) ((ltr ? newAnimate : -newAnimate) * UIScale.scale(drawerWidth + 60)); 111 | if (!ltr) { 112 | x += width * (newAnimate * zoomIn); 113 | } 114 | int y = (height / 2); 115 | int space = UIScale.scale(20); 116 | int arc = UIScale.scale(30); 117 | g2.translate(x, y); 118 | if (zoomIn > 0) { 119 | g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); 120 | float scale = 1f - newAnimate * zoomIn; 121 | g2.scale(scale, scale); 122 | } 123 | g2.translate(0, -y); 124 | g2.setColor(UIManager.getColor("Panel.background")); 125 | g2.setComposite(AlphaComposite.SrcOver.derive(0.4f)); 126 | g2.fill(new RoundRectangle2D.Double(((ltr ? -space : space) * 2) * newAnimate, (space * 2) * newAnimate, width, height - (space * 4) * newAnimate, arc, arc)); 127 | g2.setComposite(AlphaComposite.SrcOver.derive(0.4f + (animate * 0.6f))); 128 | g2.drawImage(image, (int) ((ltr ? -space : space) * newAnimate), (int) (space * newAnimate), width, (int) (height - (space * 2) * newAnimate), null); 129 | g2.setComposite(AlphaComposite.SrcOver.derive(newAnimate)); 130 | g2.drawImage(oldFormImage, 0, 0, null); 131 | g2.dispose(); 132 | } 133 | }; 134 | } 135 | 136 | private static void renderImage(Component component, Graphics g, Image image, int width, int height, int drawerWidth, float animate, boolean undecorated) { 137 | Graphics2D g2 = (Graphics2D) g; 138 | FlatUIUtils.setRenderingHints(g2); 139 | float zoomIn = ZOOM_IN; 140 | boolean ltr = component.getComponentOrientation().isLeftToRight(); 141 | int x = (int) ((ltr ? animate : -animate) * UIScale.scale(drawerWidth + 60)); 142 | if (!ltr) { 143 | x += width * (animate * zoomIn); 144 | } 145 | int y = (height / 2); 146 | int space = UIScale.scale(20); 147 | int arc = UIScale.scale(30); 148 | g2.translate(x, y); 149 | if (zoomIn > 0) { 150 | g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); 151 | float scale = 1f - animate * zoomIn; 152 | g2.scale(scale, scale); 153 | } 154 | g2.translate(0, -y); 155 | g2.setColor(UIManager.getColor("Panel.background")); 156 | g2.setComposite(AlphaComposite.SrcOver.derive(0.4f)); 157 | g2.fill(new RoundRectangle2D.Double(((ltr ? -space : space) * 2) * animate, (space * 2) * animate, width, height - (space * 4) * animate, arc, arc)); 158 | g2.fill(new RoundRectangle2D.Double((ltr ? -space : space) * animate, space * animate, width, height - (space * 2) * animate, arc, arc)); 159 | g2.setComposite(AlphaComposite.SrcOver); 160 | g2.drawImage(image, 0, 0, null); 161 | if (!undecorated) { 162 | g2.setColor(UIManager.getColor("Drawer.background")); 163 | Area area = new Area(new Rectangle.Double(0, 0, width, height)); 164 | area.subtract(new Area(new RoundRectangle2D.Double(0, 0, width, height, arc, arc))); 165 | g2.fill(area); 166 | } 167 | g2.dispose(); 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /src/raven/forms/DashboardForm.java: -------------------------------------------------------------------------------- 1 | package raven.forms; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import java.awt.BorderLayout; 5 | import java.awt.Color; 6 | import java.awt.Component; 7 | import java.text.ParseException; 8 | import java.text.SimpleDateFormat; 9 | import java.util.Calendar; 10 | import java.util.Date; 11 | import java.util.Random; 12 | import javax.swing.JLabel; 13 | import javax.swing.JPanel; 14 | import net.miginfocom.swing.MigLayout; 15 | import raven.chart.ChartLegendRenderer; 16 | import raven.chart.bar.HorizontalBarChart; 17 | import raven.chart.data.category.DefaultCategoryDataset; 18 | import raven.chart.data.pie.DefaultPieDataset; 19 | import raven.chart.line.LineChart; 20 | import raven.chart.pie.PieChart; 21 | import raven.components.SimpleForm; 22 | import raven.utils.DateCalculator; 23 | 24 | /** 25 | * 26 | * @author Raven 27 | */ 28 | public class DashboardForm extends SimpleForm { 29 | 30 | public DashboardForm() { 31 | init(); 32 | } 33 | 34 | @Override 35 | public void formRefresh() { 36 | lineChart.startAnimation(); 37 | pieChart1.startAnimation(); 38 | pieChart2.startAnimation(); 39 | pieChart3.startAnimation(); 40 | barChart1.startAnimation(); 41 | barChart2.startAnimation(); 42 | } 43 | 44 | @Override 45 | public void formInitAndOpen() { 46 | System.out.println("init and open"); 47 | } 48 | 49 | @Override 50 | public void formOpen() { 51 | System.out.println("Open"); 52 | } 53 | 54 | private void init() { 55 | setLayout(new MigLayout("wrap,fill,gap 10", "fill")); 56 | createPieChart(); 57 | createLineChart(); 58 | createBarChart(); 59 | } 60 | 61 | private void createPieChart() { 62 | pieChart1 = new PieChart(); 63 | JLabel header1 = new JLabel("Product Income"); 64 | header1.putClientProperty(FlatClientProperties.STYLE, "" 65 | + "font:+1"); 66 | pieChart1.setHeader(header1); 67 | pieChart1.getChartColor().addColor(Color.decode("#f87171"), Color.decode("#fb923c"), Color.decode("#fbbf24"), Color.decode("#a3e635"), Color.decode("#34d399"), Color.decode("#22d3ee"), Color.decode("#818cf8"), Color.decode("#c084fc")); 68 | pieChart1.putClientProperty(FlatClientProperties.STYLE, "" 69 | + "border:5,5,5,5,$Component.borderColor,,20"); 70 | pieChart1.setDataset(createPieData()); 71 | add(pieChart1, "split 3,height 290"); 72 | 73 | pieChart2 = new PieChart(); 74 | JLabel header2 = new JLabel("Product Cost"); 75 | header2.putClientProperty(FlatClientProperties.STYLE, "" 76 | + "font:+1"); 77 | pieChart2.setHeader(header2); 78 | pieChart2.getChartColor().addColor(Color.decode("#f87171"), Color.decode("#fb923c"), Color.decode("#fbbf24"), Color.decode("#a3e635"), Color.decode("#34d399"), Color.decode("#22d3ee"), Color.decode("#818cf8"), Color.decode("#c084fc")); 79 | pieChart2.putClientProperty(FlatClientProperties.STYLE, "" 80 | + "border:5,5,5,5,$Component.borderColor,,20"); 81 | pieChart2.setDataset(createPieData()); 82 | add(pieChart2, "height 290"); 83 | 84 | pieChart3 = new PieChart(); 85 | JLabel header3 = new JLabel("Product Profit"); 86 | header3.putClientProperty(FlatClientProperties.STYLE, "" 87 | + "font:+1"); 88 | pieChart3.setHeader(header3); 89 | pieChart3.getChartColor().addColor(Color.decode("#f87171"), Color.decode("#fb923c"), Color.decode("#fbbf24"), Color.decode("#a3e635"), Color.decode("#34d399"), Color.decode("#22d3ee"), Color.decode("#818cf8"), Color.decode("#c084fc")); 90 | pieChart3.setChartType(PieChart.ChartType.DONUT_CHART); 91 | pieChart3.putClientProperty(FlatClientProperties.STYLE, "" 92 | + "border:5,5,5,5,$Component.borderColor,,20"); 93 | pieChart3.setDataset(createPieData()); 94 | add(pieChart3, "height 290"); 95 | } 96 | 97 | private void createLineChart() { 98 | lineChart = new LineChart(); 99 | lineChart.setChartType(LineChart.ChartType.CURVE); 100 | lineChart.putClientProperty(FlatClientProperties.STYLE, "" 101 | + "border:5,5,5,5,$Component.borderColor,,20"); 102 | add(lineChart); 103 | createLineChartData(); 104 | } 105 | 106 | private void createBarChart() { 107 | // BarChart 1 108 | barChart1 = new HorizontalBarChart(); 109 | JLabel header1 = new JLabel("Monthly Income"); 110 | header1.putClientProperty(FlatClientProperties.STYLE, "" 111 | + "font:+1;" 112 | + "border:0,0,5,0"); 113 | barChart1.setHeader(header1); 114 | barChart1.setBarColor(Color.decode("#f97316")); 115 | barChart1.setDataset(createData()); 116 | JPanel panel1 = new JPanel(new BorderLayout()); 117 | panel1.putClientProperty(FlatClientProperties.STYLE, "" 118 | + "border:5,5,5,5,$Component.borderColor,,20"); 119 | panel1.add(barChart1); 120 | add(panel1, "split 2,gap 0 20"); 121 | 122 | // BarChart 2 123 | barChart2 = new HorizontalBarChart(); 124 | JLabel header2 = new JLabel("Monthly Expense"); 125 | header2.putClientProperty(FlatClientProperties.STYLE, "" 126 | + "font:+1;" 127 | + "border:0,0,5,0"); 128 | barChart2.setHeader(header2); 129 | barChart2.setBarColor(Color.decode("#10b981")); 130 | barChart2.setDataset(createData()); 131 | JPanel panel2 = new JPanel(new BorderLayout()); 132 | panel2.putClientProperty(FlatClientProperties.STYLE, "" 133 | + "border:5,5,5,5,$Component.borderColor,,20"); 134 | panel2.add(barChart2); 135 | add(panel2); 136 | } 137 | 138 | private DefaultPieDataset createData() { 139 | DefaultPieDataset dataset = new DefaultPieDataset<>(); 140 | Random random = new Random(); 141 | dataset.addValue("July (ongoing)", random.nextInt(100)); 142 | dataset.addValue("June", random.nextInt(100)); 143 | dataset.addValue("May", random.nextInt(100)); 144 | dataset.addValue("April", random.nextInt(100)); 145 | dataset.addValue("March", random.nextInt(100)); 146 | dataset.addValue("February", random.nextInt(100)); 147 | return dataset; 148 | } 149 | 150 | private DefaultPieDataset createPieData() { 151 | DefaultPieDataset dataset = new DefaultPieDataset<>(); 152 | Random random = new Random(); 153 | dataset.addValue("Bags", random.nextInt(100) + 50); 154 | dataset.addValue("Hats", random.nextInt(100) + 50); 155 | dataset.addValue("Glasses", random.nextInt(100) + 50); 156 | dataset.addValue("Watches", random.nextInt(100) + 50); 157 | dataset.addValue("Jewelry", random.nextInt(100) + 50); 158 | return dataset; 159 | } 160 | 161 | private void createLineChartData() { 162 | DefaultCategoryDataset categoryDataset = new DefaultCategoryDataset<>(); 163 | Calendar cal = Calendar.getInstance(); 164 | SimpleDateFormat df = new SimpleDateFormat("MMM dd, yyyy"); 165 | Random ran = new Random(); 166 | int randomDate = 30; 167 | for (int i = 1; i <= randomDate; i++) { 168 | String date = df.format(cal.getTime()); 169 | categoryDataset.addValue(ran.nextInt(700) + 5, "Income", date); 170 | categoryDataset.addValue(ran.nextInt(700) + 5, "Expense", date); 171 | categoryDataset.addValue(ran.nextInt(700) + 5, "Profit", date); 172 | 173 | cal.add(Calendar.DATE, 1); 174 | } 175 | 176 | /** 177 | * Control the legend we do not show all legend 178 | */ 179 | try { 180 | Date date = df.parse(categoryDataset.getColumnKey(0)); 181 | Date dateEnd = df.parse(categoryDataset.getColumnKey(categoryDataset.getColumnCount() - 1)); 182 | 183 | DateCalculator dcal = new DateCalculator(date, dateEnd); 184 | long diff = dcal.getDifferenceDays(); 185 | 186 | double d = Math.ceil((diff / 10f)); 187 | lineChart.setLegendRenderer(new ChartLegendRenderer() { 188 | @Override 189 | public Component getLegendComponent(Object legend, int index) { 190 | if (index % d == 0) { 191 | return super.getLegendComponent(legend, index); 192 | } else { 193 | return null; 194 | } 195 | } 196 | }); 197 | } catch (ParseException e) { 198 | System.err.println(e); 199 | } 200 | 201 | lineChart.setCategoryDataset(categoryDataset); 202 | lineChart.getChartColor().addColor(Color.decode("#38bdf8"), Color.decode("#fb7185"), Color.decode("#34d399")); 203 | JLabel header = new JLabel("Income Data"); 204 | header.putClientProperty(FlatClientProperties.STYLE, "" 205 | + "font:+1;" 206 | + "border:0,0,5,0"); 207 | lineChart.setHeader(header); 208 | } 209 | 210 | private LineChart lineChart; 211 | private HorizontalBarChart barChart1; 212 | private HorizontalBarChart barChart2; 213 | private PieChart pieChart1; 214 | private PieChart pieChart2; 215 | private PieChart pieChart3; 216 | } 217 | -------------------------------------------------------------------------------- /src/raven/menu/MyDrawerBuilder.java: -------------------------------------------------------------------------------- 1 | package raven.menu; 2 | 3 | import com.formdev.flatlaf.FlatClientProperties; 4 | import com.formdev.flatlaf.extras.FlatSVGIcon; 5 | import java.awt.Color; 6 | import java.awt.Component; 7 | import javax.swing.Icon; 8 | import javax.swing.JButton; 9 | import javax.swing.JComponent; 10 | import javax.swing.JLabel; 11 | import raven.drawer.component.DrawerPanel; 12 | import raven.drawer.component.SimpleDrawerBuilder; 13 | import raven.drawer.component.footer.SimpleFooterData; 14 | import raven.drawer.component.header.SimpleHeaderData; 15 | import raven.drawer.component.header.SimpleHeaderStyle; 16 | import raven.drawer.component.menu.MenuAction; 17 | import raven.drawer.component.menu.MenuEvent; 18 | import raven.drawer.component.menu.MenuValidation; 19 | import raven.drawer.component.menu.SimpleMenuOption; 20 | import raven.drawer.component.menu.SimpleMenuStyle; 21 | import raven.drawer.component.menu.data.Item; 22 | import raven.drawer.component.menu.data.MenuItem; 23 | import raven.forms.DashboardForm; 24 | import raven.forms.InboxForm; 25 | import raven.forms.ReadForm; 26 | import raven.model.ModelUser; 27 | import raven.swing.AvatarIcon; 28 | 29 | /** 30 | * 31 | * @author Raven 32 | */ 33 | public class MyDrawerBuilder extends SimpleDrawerBuilder { 34 | 35 | private ModelUser user; 36 | private final ThemesChange themesChange; 37 | 38 | public void setUser(ModelUser user) { 39 | this.user = user; 40 | SimpleHeaderData headerData = header.getSimpleHeaderData(); 41 | headerData.setTitle(user.getUserName()); 42 | header.setSimpleHeaderData(headerData); 43 | rebuildMenu(); 44 | } 45 | 46 | public MyDrawerBuilder() { 47 | themesChange = new ThemesChange(); 48 | } 49 | 50 | @Override 51 | public Component getFooter() { 52 | return themesChange; 53 | } 54 | 55 | @Override 56 | public SimpleHeaderData getSimpleHeaderData() { 57 | AvatarIcon icon = new AvatarIcon(getClass().getResource("/raven/resources/image/profile.png"), 60, 60, 999); 58 | icon.setBorder(2); 59 | return new SimpleHeaderData() 60 | .setIcon(icon) 61 | .setTitle("Ra Ven") 62 | .setDescription("raven@gmail.com") 63 | .setHeaderStyle(new SimpleHeaderStyle() { 64 | 65 | @Override 66 | public void styleTitle(JLabel label) { 67 | label.putClientProperty(FlatClientProperties.STYLE, "" 68 | + "[light]foreground:#FAFAFA"); 69 | } 70 | 71 | @Override 72 | public void styleDescription(JLabel label) { 73 | label.putClientProperty(FlatClientProperties.STYLE, "" 74 | + "[light]foreground:#E1E1E1"); 75 | } 76 | }); 77 | } 78 | 79 | @Override 80 | public SimpleFooterData getSimpleFooterData() { 81 | return new SimpleFooterData(); 82 | } 83 | 84 | @Override 85 | public SimpleMenuOption getSimpleMenuOption() { 86 | 87 | MenuItem items[] = new MenuItem[]{ 88 | new Item.Label("MAIN"), 89 | new Item("Dashboard", "dashboard.svg"), 90 | new Item.Label("WEB APP"), 91 | new Item("Email", "email.svg") 92 | .subMenu("Inbox") 93 | .subMenu("Read") 94 | .subMenu( 95 | new Item("Group Read") 96 | .subMenu("Read 1") 97 | .subMenu("Read 2") 98 | .subMenu( 99 | new Item("Group Item") 100 | .subMenu("Item 1") 101 | .subMenu("Item 2") 102 | .subMenu("Item 3") 103 | .subMenu("Item 4") 104 | .subMenu("Item 5") 105 | .subMenu("Item 6") 106 | ) 107 | .subMenu("Read 3") 108 | .subMenu("Read 4") 109 | .subMenu("Read 5") 110 | ) 111 | .subMenu("Compost"), 112 | new Item("Chat", "chat.svg"), 113 | new Item("Calendar", "calendar.svg"), 114 | new Item.Label("COMPONENT"), 115 | new Item("Advanced UI", "ui.svg") 116 | .subMenu("Cropper") 117 | .subMenu("Owl Carousel") 118 | .subMenu("Sweet Alert"), 119 | new Item("Forms", "forms.svg") 120 | .subMenu("Basic Elements") 121 | .subMenu("Advanced Elements") 122 | .subMenu("SEditors") 123 | .subMenu("Wizard"), 124 | new Item.Label("OTHER"), 125 | new Item("Charts", "chart.svg") 126 | .subMenu("Apex") 127 | .subMenu("Flot") 128 | .subMenu("Sparkline"), 129 | new Item("Icons", "icon.svg") 130 | .subMenu("Feather Icons") 131 | .subMenu("Flag Icons") 132 | .subMenu("Mdi Icons"), 133 | new Item("Special Pages", "page.svg") 134 | .subMenu("Blank page") 135 | .subMenu("Faq") 136 | .subMenu("Invoice") 137 | .subMenu("Profile") 138 | .subMenu("Pricing") 139 | .subMenu("Timeline"), 140 | new Item("Logout", "logout.svg") 141 | }; 142 | 143 | SimpleMenuOption simpleMenuOption = new SimpleMenuOption() { 144 | @Override 145 | public Icon buildMenuIcon(String path, float scale) { 146 | FlatSVGIcon icon = new FlatSVGIcon(path, scale); 147 | FlatSVGIcon.ColorFilter colorFilter = new FlatSVGIcon.ColorFilter(); 148 | colorFilter.add(Color.decode("#969696"), Color.decode("#FAFAFA"), Color.decode("#969696")); 149 | icon.setColorFilter(colorFilter); 150 | return icon; 151 | } 152 | }; 153 | 154 | simpleMenuOption.setMenuValidation(new MenuValidation() { 155 | 156 | private boolean checkMenu(int[] index, int[] indexHide) { 157 | if (index.length == indexHide.length) { 158 | for (int i = 0; i < index.length; i++) { 159 | if (index[i] != indexHide[i]) { 160 | return true; 161 | } 162 | } 163 | return false; 164 | } 165 | return true; 166 | } 167 | 168 | @Override 169 | public boolean menuValidation(int[] index) { 170 | if (user == null) { 171 | return false; 172 | } 173 | if (!user.isAdmin()) { 174 | // non user admin going to hide 175 | boolean act 176 | // `Email`->`Gropu Read`->`Read 3` 177 | = checkMenu(index, new int[]{1, 2, 3}) 178 | // `Email`->`Gropu Read`->`Read 5` 179 | && checkMenu(index, new int[]{1, 2, 5}) 180 | // `Email`->`Group Read`->`Group Item->`Item 4` 181 | && checkMenu(index, new int[]{1, 2, 2, 3}) 182 | // `Advanced UI`->`Owl Carousel` 183 | && checkMenu(index, new int[]{4, 1}) 184 | // `Special Pages` 185 | && checkMenu(index, new int[]{8}); 186 | return act; 187 | } 188 | return true; 189 | } 190 | }); 191 | 192 | simpleMenuOption.setMenuStyle(new SimpleMenuStyle() { 193 | @Override 194 | public void styleMenuItem(JButton menu, int[] index) { 195 | menu.putClientProperty(FlatClientProperties.STYLE, "" 196 | + "[light]foreground:#FAFAFA;" 197 | + "arc:10"); 198 | } 199 | 200 | @Override 201 | public void styleMenu(JComponent component) { 202 | component.putClientProperty(FlatClientProperties.STYLE, "" 203 | + "background:$Drawer.background"); 204 | } 205 | 206 | @Override 207 | public void styleLabel(JLabel label) { 208 | label.putClientProperty(FlatClientProperties.STYLE, "" 209 | + "[light]foreground:darken(#FAFAFA,15%);" 210 | + "[dark]foreground:darken($Label.foreground,30%)"); 211 | } 212 | }); 213 | simpleMenuOption.addMenuEvent(new MenuEvent() { 214 | @Override 215 | public void selected(MenuAction action, int[] index) { 216 | if (index.length == 1) { 217 | if (index[0] == 0) { 218 | FormManager.showForm(new DashboardForm()); 219 | } 220 | if (index[0] == 9) { 221 | // logout 222 | FormManager.logout(); 223 | } 224 | } else if (index.length == 2) { 225 | if (index[0] == 1) { 226 | if (index[1] == 0) { 227 | FormManager.showForm(new InboxForm()); 228 | } else if (index[1] == 1) { 229 | FormManager.showForm(new ReadForm()); 230 | } 231 | } 232 | } 233 | } 234 | }); 235 | 236 | simpleMenuOption.setMenus(items) 237 | .setBaseIconPath("raven/resources/menu") 238 | .setIconScale(0.45f); 239 | return simpleMenuOption; 240 | } 241 | 242 | @Override 243 | 244 | public void build(DrawerPanel drawerPanel) { 245 | drawerPanel.putClientProperty(FlatClientProperties.STYLE, "" 246 | + "background:$Drawer.background"); 247 | } 248 | 249 | @Override 250 | public int getDrawerWidth() { 251 | return 270; 252 | } 253 | } 254 | -------------------------------------------------------------------------------- /nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | Must set src.dir 292 | Must set test.src.dir 293 | Must set build.dir 294 | Must set dist.dir 295 | Must set build.classes.dir 296 | Must set dist.javadoc.dir 297 | Must set build.test.classes.dir 298 | Must set build.test.results.dir 299 | Must set build.classes.excludes 300 | Must set dist.jar 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | Must set javac.includes 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | No tests executed. 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | Must set JVM to use for profiling in profiler.info.jvm 834 | Must set profiler agent JVM arguments in profiler.info.jvmargs.agent 835 | 836 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | Must select some files in the IDE or set javac.includes 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | To run this application from the command line without Ant, try: 1201 | 1202 | java -jar "${dist.jar.resolved}" 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | 1296 | 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | Must select one file in the IDE or set run.class 1341 | 1342 | 1343 | 1344 | Must select one file in the IDE or set run.class 1345 | 1346 | 1347 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | Must select one file in the IDE or set debug.class 1372 | 1373 | 1374 | 1375 | 1376 | Must select one file in the IDE or set debug.class 1377 | 1378 | 1379 | 1380 | 1381 | Must set fix.includes 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1393 | 1396 | 1397 | This target only works when run from inside the NetBeans IDE. 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | Must select one file in the IDE or set profile.class 1407 | This target only works when run from inside the NetBeans IDE. 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | This target only works when run from inside the NetBeans IDE. 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | This target only works when run from inside the NetBeans IDE. 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | 1450 | 1451 | 1452 | 1453 | 1454 | 1455 | 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 1463 | Must select one file in the IDE or set run.class 1464 | 1465 | 1466 | 1467 | 1468 | 1469 | Must select some files in the IDE or set test.includes 1470 | 1471 | 1472 | 1473 | 1474 | Must select one file in the IDE or set run.class 1475 | 1476 | 1477 | 1478 | 1479 | Must select one file in the IDE or set applet.url 1480 | 1481 | 1482 | 1483 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | 1511 | 1512 | 1513 | 1514 | 1515 | 1516 | 1517 | 1518 | 1519 | 1520 | 1521 | 1522 | 1523 | 1524 | 1525 | 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 1533 | 1534 | 1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | 1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 1553 | 1554 | 1555 | 1556 | 1557 | 1558 | 1559 | 1560 | 1561 | 1562 | 1563 | 1564 | 1565 | 1566 | 1567 | 1568 | 1569 | 1570 | 1571 | 1572 | 1573 | 1574 | 1575 | 1576 | 1577 | 1578 | 1579 | 1580 | 1581 | 1582 | 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 1593 | 1594 | 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 1603 | 1604 | 1605 | 1606 | 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | Must select some files in the IDE or set javac.includes 1618 | 1619 | 1620 | 1621 | 1622 | 1623 | 1624 | 1625 | 1626 | 1627 | 1628 | 1629 | 1630 | 1631 | 1632 | 1633 | 1638 | 1639 | 1640 | 1641 | 1642 | 1643 | 1644 | 1645 | Some tests failed; see details above. 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | Must select some files in the IDE or set test.includes 1655 | 1656 | 1657 | 1658 | Some tests failed; see details above. 1659 | 1660 | 1661 | 1662 | Must select some files in the IDE or set test.class 1663 | Must select some method in the IDE or set test.method 1664 | 1665 | 1666 | 1667 | Some tests failed; see details above. 1668 | 1669 | 1670 | 1675 | 1676 | Must select one file in the IDE or set test.class 1677 | 1678 | 1679 | 1680 | Must select one file in the IDE or set test.class 1681 | Must select some method in the IDE or set test.method 1682 | 1683 | 1684 | 1685 | 1686 | 1687 | 1688 | 1689 | 1690 | 1691 | 1692 | 1693 | 1694 | 1699 | 1700 | Must select one file in the IDE or set applet.url 1701 | 1702 | 1703 | 1704 | 1705 | 1706 | 1707 | 1712 | 1713 | Must select one file in the IDE or set applet.url 1714 | 1715 | 1716 | 1717 | 1718 | 1719 | 1720 | 1721 | 1726 | 1727 | 1728 | 1729 | 1730 | 1731 | 1732 | 1733 | 1734 | 1735 | 1736 | 1737 | 1738 | 1739 | 1740 | 1741 | 1742 | 1743 | 1744 | 1745 | 1746 | 1747 | 1748 | 1749 | 1750 | 1751 | 1752 | 1753 | 1754 | 1755 | 1756 | 1757 | 1758 | 1759 | 1760 | 1761 | 1762 | 1763 | 1764 | 1765 | 1766 | 1767 | 1768 | 1769 | 1770 | 1771 | 1772 | --------------------------------------------------------------------------------