Demo: added "Extras" tab
@@ -21,6 +21,7 @@ import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.text.DefaultEditorKit;
|
||||
import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.demo.extras.*;
|
||||
import com.formdev.flatlaf.demo.intellijthemes.*;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import net.miginfocom.swing.*;
|
||||
@@ -156,6 +157,7 @@ class DemoFrame
|
||||
DataComponentsPanel dataComponentsPanel = new DataComponentsPanel();
|
||||
TabsPanel tabsPanel = new TabsPanel();
|
||||
OptionPanePanel optionPanePanel = new OptionPanePanel();
|
||||
ExtrasPanel extrasPanel1 = new ExtrasPanel();
|
||||
controlBar = new ControlBar();
|
||||
IJThemesPanel themesPanel = new IJThemesPanel();
|
||||
|
||||
@@ -447,6 +449,7 @@ class DemoFrame
|
||||
tabbedPane.addTab("Data Components", dataComponentsPanel);
|
||||
tabbedPane.addTab("SplitPane & Tabs", tabsPanel);
|
||||
tabbedPane.addTab("Option Pane", optionPanePanel);
|
||||
tabbedPane.addTab("Extras", extrasPanel1);
|
||||
}
|
||||
contentPanel.add(tabbedPane, "cell 0 0");
|
||||
}
|
||||
|
||||
@@ -93,6 +93,11 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"title": "Option Pane"
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.demo.extras.ExtrasPanel" ) {
|
||||
name: "extrasPanel1"
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"title": "Extras"
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 0"
|
||||
} )
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Copyright 2020 FormDev Software GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.formdev.flatlaf.demo.extras;
|
||||
|
||||
import javax.swing.*;
|
||||
import com.formdev.flatlaf.extras.*;
|
||||
import net.miginfocom.swing.*;
|
||||
|
||||
/**
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
public class ExtrasPanel
|
||||
extends JPanel
|
||||
{
|
||||
public ExtrasPanel() {
|
||||
initComponents();
|
||||
|
||||
triStateLabel1.setText( triStateCheckBox1.getState().toString() );
|
||||
|
||||
addSVGIcon( "actions/copy.svg" );
|
||||
addSVGIcon( "actions/colors.svg" );
|
||||
addSVGIcon( "actions/execute.svg" );
|
||||
addSVGIcon( "actions/suspend.svg" );
|
||||
addSVGIcon( "actions/intentionBulb.svg" );
|
||||
addSVGIcon( "actions/quickfixOffBulb.svg" );
|
||||
|
||||
addSVGIcon( "objects/abstractClass.svg" );
|
||||
addSVGIcon( "objects/abstractMethod.svg" );
|
||||
addSVGIcon( "objects/annotationtype.svg" );
|
||||
addSVGIcon( "objects/annotationtype.svg" );
|
||||
addSVGIcon( "objects/css.svg" );
|
||||
addSVGIcon( "objects/javaScript.svg" );
|
||||
addSVGIcon( "objects/xhtml.svg" );
|
||||
|
||||
addSVGIcon( "errorDialog.svg" );
|
||||
addSVGIcon( "informationDialog.svg" );
|
||||
addSVGIcon( "warningDialog.svg" );
|
||||
}
|
||||
|
||||
private void addSVGIcon( String name ) {
|
||||
svgIconsPanel.add( new JLabel( new FlatSVGIcon( "com/formdev/flatlaf/demo/extras/svg/" + name ) ) );
|
||||
}
|
||||
|
||||
private void triStateCheckBox1Changed() {
|
||||
triStateLabel1.setText( triStateCheckBox1.getState().toString() );
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||
label4 = new JLabel();
|
||||
label1 = new JLabel();
|
||||
triStateCheckBox1 = new TriStateCheckBox();
|
||||
triStateLabel1 = new JLabel();
|
||||
label2 = new JLabel();
|
||||
svgIconsPanel = new JPanel();
|
||||
label3 = new JLabel();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
"hidemode 3",
|
||||
// columns
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[left]",
|
||||
// rows
|
||||
"[]para" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]"));
|
||||
|
||||
//---- label4 ----
|
||||
label4.setText("Note: Components on this page require the flatlaf-extras library.");
|
||||
add(label4, "cell 0 0 3 1");
|
||||
|
||||
//---- label1 ----
|
||||
label1.setText("TriStateCheckBox:");
|
||||
add(label1, "cell 0 1");
|
||||
|
||||
//---- triStateCheckBox1 ----
|
||||
triStateCheckBox1.setText("three states");
|
||||
triStateCheckBox1.addActionListener(e -> triStateCheckBox1Changed());
|
||||
add(triStateCheckBox1, "cell 1 1");
|
||||
|
||||
//---- triStateLabel1 ----
|
||||
triStateLabel1.setText("text");
|
||||
add(triStateLabel1, "cell 2 1");
|
||||
|
||||
//---- label2 ----
|
||||
label2.setText("SVG Icons:");
|
||||
add(label2, "cell 0 2");
|
||||
|
||||
//======== svgIconsPanel ========
|
||||
{
|
||||
svgIconsPanel.setLayout(new MigLayout(
|
||||
"insets 0,hidemode 3",
|
||||
// columns
|
||||
"[fill]",
|
||||
// rows
|
||||
"[grow,center]"));
|
||||
}
|
||||
add(svgIconsPanel, "cell 1 2 2 1");
|
||||
|
||||
//---- label3 ----
|
||||
label3.setText("The icons may change colors when switching to another theme.");
|
||||
add(label3, "cell 1 3 2 1");
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||
private JLabel label4;
|
||||
private JLabel label1;
|
||||
private TriStateCheckBox triStateCheckBox1;
|
||||
private JLabel triStateLabel1;
|
||||
private JLabel label2;
|
||||
private JPanel svgIconsPanel;
|
||||
private JLabel label3;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "hidemode 3"
|
||||
"$columnConstraints": "[][][left]"
|
||||
"$rowConstraints": "[]para[][][]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label4"
|
||||
"text": "Note: Components on this page require the flatlaf-extras library."
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 0 3 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label1"
|
||||
"text": "TriStateCheckBox:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 1"
|
||||
} )
|
||||
add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) {
|
||||
name: "triStateCheckBox1"
|
||||
"text": "three states"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "triStateCheckBox1Changed", false ) )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "triStateLabel1"
|
||||
"text": "text"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 2 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label2"
|
||||
"text": "SVG Icons:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 2"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets 0,hidemode 3"
|
||||
"$columnConstraints": "[fill]"
|
||||
"$rowConstraints": "[grow,center]"
|
||||
} ) {
|
||||
name: "svgIconsPanel"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 2 2 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label3"
|
||||
"text": "The icons may change colors when switching to another theme."
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 3 2 1"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 500, 300 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
The icons in this folder are from IntelliJ IDEA Community Edition,
|
||||
which is licensed under the Apache 2.0 license. Copyright 2000-2019 JetBrains s.r.o.
|
||||
See: https://github.com/JetBrains/intellij-community/
|
||||
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd" transform="translate(2 2)">
|
||||
<rect width="5.5" height="5.5" fill="#59A869"/>
|
||||
<rect width="5.5" height="5.5" x="6.5" fill="#EDA200"/>
|
||||
<rect width="5.5" height="5.5" y="6.5" fill="#389FD6"/>
|
||||
<rect width="5.5" height="5.5" x="6.5" y="6.5" fill="#DB5860"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 403 B |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#6E6E6E" d="M11,3 L4,3 L4,11 L2,11 L2,1 L11,1 L11,3 Z"/>
|
||||
<path fill="#6E6E6E" d="M5,4 L14,4 L14,14 L5,14 L5,4 Z M7,6 L7,7 L12,7 L12,6 L7,6 Z M7,10 L7,11 L12,11 L12,10 L7,10 Z M7,8 L7,9 L12,9 L12,8 L7,8 Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 363 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<polygon fill="#59A869" fill-rule="evenodd" points="4 2 14 8 4 14"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 162 B |
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="6" height="1" x="5" y="12" fill="#6E6E6E"/>
|
||||
<path fill="#6E6E6E" d="M5.5,14 L10.5,14 L10.5,14 C10.5,14.5522847 10.0522847,15 9.5,15 L6.5,15 C5.94771525,15 5.5,14.5522847 5.5,14 Z"/>
|
||||
<path fill="#EDA200" d="M13,5.2 C13,9.2 11,8.96875 11,11 L5,11 C5,9.03125 3,9.2 3,5.2 C3,2.991 5.23878906,1 8,1 C10.76125,1 13,2.99103125 13,5.2 Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 493 B |
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="6" height="1" x="5" y="12" fill="#6E6E6E"/>
|
||||
<path fill="#6E6E6E" d="M5.5,14 L10.5,14 L10.5,14 C10.5,14.5522847 10.0522847,15 9.5,15 L6.5,15 C5.94771525,15 5.5,14.5522847 5.5,14 Z"/>
|
||||
<path fill="#389FD6" d="M13,5.2 C13,9.2 11,8.96875 11,11 L5,11 C5,9.03125 3,9.2 3,5.2 C3,2.991 5.23878906,1 8,1 C10.76125,1 13,2.99103125 13,5.2 Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 493 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<rect width="10" height="10" x="3" y="3" fill="#DB5860" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 171 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
<path fill="#DB5860" fill-rule="evenodd" d="M16,30 C8.2680135,30 2,23.7319865 2,16 C2,8.2680135 8.2680135,2 16,2 C23.7319865,2 30,8.2680135 30,16 C30,23.7319865 23.7319865,30 16,30 Z M14,7 L14,18 L18,18 L18,7 L14,7 Z M14,21 L14,25 L18,25 L18,21 L14,21 Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 350 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
<path fill="#389FD6" fill-rule="evenodd" d="M16,30 C8.2680135,30 2,23.7319865 2,16 C2,8.2680135 8.2680135,2 16,2 C23.7319865,2 30,8.2680135 30,16 C30,23.7319865 23.7319865,30 16,30 Z M14,7 L14,18 L18,18 L18,7 L14,7 Z M14,21 L14,25 L18,25 L18,21 L14,21 Z" transform="rotate(180 16 16)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 380 B |
@@ -0,0 +1,19 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<rect id="abstractclass-a" width="8" height="14"/>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#9AA7B0" fill-opacity=".8" d="M3 3.1055C1.764 4.3685 1 6.0935 1 8.0005 1 9.9065 1.764 11.6315 3 12.8945L3 3.1055zM13 3.1055L13 12.8945C14.236 11.6315 15 9.9065 15 8.0005 15 6.0935 14.236 4.3675 13 3.1055"/>
|
||||
<g transform="translate(4 1)">
|
||||
<mask id="abstractclass-b" fill="#fff">
|
||||
<use xlink:href="#abstractclass-a"/>
|
||||
</mask>
|
||||
<g mask="url(#abstractclass-b)">
|
||||
<g transform="translate(-4 -1)">
|
||||
<path fill="#40B6E0" fill-opacity=".6" d="M15,8 C15,11.866 11.866,15 8,15 C4.134,15 1,11.866 1,8 C1,4.134 4.134,1 8,1 C11.866,1 15,4.134 15,8"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M5,4.28253174 C4.53,4.74153174 4.028,4.978 3.1,5 C2.061,5.022 1,4.2794 1,3.0004 C1,1.7124 1.971,1 3.1,1 C3.94833171,1 4.54833171,1.18475342 4.9,1.55426025 L5.5162,0.836730957 C4.8293999,0.270175195 4.28826904,0.0004 3.0982,0.0004 C1.3402,0.0004 0.0002,1.3584 0.0002,3.0004 C0.0002,4.6824 1.3642,6.0004 3.0022,6.0004 C4.29284668,6.0004 5.0232,5.5934 5.6162,4.9814 C5.2054,4.51548783 5,4.28253174 5,4.28253174 Z" transform="translate(5 5)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,19 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<rect id="abstractmethod-a" width="8" height="14"/>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#9AA7B0" fill-opacity=".8" d="M3 3.1055C1.764 4.3685 1 6.0935 1 8.0005 1 9.9065 1.764 11.6315 3 12.8945L3 3.1055zM13 3.1055L13 12.8945C14.236 11.6315 15 9.9065 15 8.0005 15 6.0935 14.236 4.3675 13 3.1055"/>
|
||||
<g transform="translate(4 1)">
|
||||
<mask id="abstractmethod-b" fill="#fff">
|
||||
<use xlink:href="#abstractmethod-a"/>
|
||||
</mask>
|
||||
<g mask="url(#abstractmethod-b)">
|
||||
<g transform="translate(-4 -1)">
|
||||
<path fill="#F98B9E" fill-opacity=".6" d="M15,8 C15,11.866 11.866,15 8,15 C4.134,15 1,11.866 1,8 C1,4.134 4.134,1 8,1 C11.866,1 15,4.134 15,8"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M6.9922,2 C6.9912,1.251 6.63513184,0.0003 4.98162842,0.0003 C4.11224365,0.0003 3.6576,0.502 3.5986,0.6 C3.28363037,0.194116211 2.94411621,0.0003 2.1,0.0003 C1.63194173,0.0003 1.26527507,0.0999436667 1,0.299231 L1,0.0003 L0,0.0003 L0,5.0003 L1,5.0003 C0.966666667,3.1563 0.966666667,2.1562 1,2 C1.05,1.7657 1.05,1 2,1 C2.95,1 2.999,1.537 3,2 L3,5.0003 L4,5.0003 L4,2 C4,1.686 3.95911952,1 4.98162842,1 C6.00413731,1 6.00413731,1.73961181 6.00469971,2 C6.00469971,2.79041884 6.00469971,3.38323296 6.00469971,3.77844238 C6.00469971,4.0499663 6.00469971,4.45725217 6.00469971,5.0003 L6.9972,5.0003 L6.9922,2 Z" transform="translate(5 6)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#62B543" fill-opacity=".6" d="M15,8 C15,11.866 11.866,15 8,15 C4.134,15 1,11.866 1,8 C1,4.134 4.134,1 8,1 C11.866,1 15,4.134 15,8"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M3.6281,2.7611 C3.4731,2.8511 3.3451,2.9741 3.2461,3.1241 C3.1511,3.2721 3.0811,3.4411 3.0391,3.6261 C2.9971,3.8091 2.9761,3.9961 2.9761,4.1841 C2.9761,4.5861 3.0491,4.8721 3.1971,5.0581 C3.3491,5.2481 3.5541,5.3451 3.8051,5.3451 C3.9701,5.3451 4.1151,5.3071 4.2371,5.2311 C4.3571,5.1581 4.4571,5.0531 4.5331,4.9201 C4.6061,4.7931 4.6631,4.6401 4.7011,4.4641 C4.7391,4.2941 4.7641,4.1011 4.7731,3.8931 L4.8421,2.6991 L4.8001,2.6891 C4.6851,2.6621 4.5981,2.6481 4.5001,2.6371 C4.4021,2.6271 4.3041,2.6221 4.2021,2.6221 C3.9781,2.6221 3.7861,2.6681 3.6281,2.7611 Z M0.0021,4.0006 C0.0021,0.0011 3.66741943,0.0011 4.3161,0.0011 C4.65105644,0.0011 8.0001,0.0864290039 8.0001,3.5571 C8.0001,6.0091 6.4751,6 6.1701,6 C5.67331784,5.97 5.31431784,5.7737 5.0931,5.4111 C4.68260397,5.8037 4.28127064,6 3.8891,6 C3.0796519,6 2.0001,5.9211 2.0001,4.0001 C2.0001,2.32043457 3.45593262,2.0001 4.0001,2.0001 C4.1531,2.0001 5.7451,2.0551 5.8241,2.0791 L5.7441,4.1881 C5.6361,4.89276667 5.7991,5.2451 6.2331,5.2451 C6.95605469,5.2451 7.0601,3.7831 7.0601,3.5471 C7.0601,0.907409668 4.7081,0.7451 4.3161,0.7451 C3.7711,0.7451 0.94354248,0.850891113 0.94354248,4.0006 C0.94354248,4.58402311 0.94354248,7.2461 3.8891,7.2461 C4.0901,7.2461 5.7441,7.04302979 6.1621,6.8281 L6.1621,7.5781 C5.8551,7.7031 5.0931,8.0001 3.8981,8.0001 C3.15576172,8.0001 0.0021,8.0001 0.0021,4.0006 Z" transform="translate(4 4)"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<polygon fill="#9AA7B0" fill-opacity=".8" points="7 1 3 5 7 5"/>
|
||||
<polygon fill="#9AA7B0" fill-opacity=".8" points="8 1 8 6 3 6 3 8 13 8 13 1"/>
|
||||
<polygon fill="#40B6E0" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M0,2.501 C0,1 0.931,2.02832126e-16 2.256,0 C3.20239258,0 3.55,0.311 3.969,0.753 L3.42669678,1.42712402 C3.07669678,1.06812402 2.75,1 2.25,1 C1.418,1 1,1.73791504 1,2.487 C1,3.23608496 1.412,4 2.25,4 C2.787,4 3.05169678,3.89340869 3.42669678,3.50640869 L4,4.144 C3.544,4.669 3.19732666,5 2.225,5 C0.949,5 7.35277938e-17,4.002 0,2.501 Z" transform="translate(2 10)"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M0.972767969,1.50152588 C0.972767969,1.13305664 1.284,1 1.845,1 C1.85033333,1 2.23533333,1 3,1 L3,0 C2.26266667,0 1.88266667,0 1.86,0 C0.778,0 0,0.45916748 0,1.45 C0,2.31452637 0.419555664,2.69049072 1.47125244,2.91607666 C2.24158869,3.08131157 2.496155,3.22862939 2.496155,3.548 C2.496155,3.86737061 2.13842773,4 1.47125244,4 C1.46058577,4 1.07016829,4 0.3,4 L0.3,5 C1.07550163,5 1.46591911,5 1.47125244,5 C3.5,5 3.5,4 3.5,3.548 C3.5,2.91607666 3.02026367,2.42071533 2.15869141,2.14685059 C1.29711914,1.87298584 0.972767969,1.86999512 0.972767969,1.50152588 Z" transform="translate(7 10)"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M0.972767969,1.50152588 C0.972767969,1.13305664 1.284,1 1.845,1 C1.85033333,1 2.23533333,1 3,1 L3,0 C2.26266667,0 1.88266667,0 1.86,0 C0.778,0 0,0.45916748 0,1.45 C0,2.31452637 0.419555664,2.69049072 1.47125244,2.91607666 C2.24158869,3.08131157 2.496155,3.22862939 2.496155,3.548 C2.496155,3.86737061 2.13842773,4 1.47125244,4 C1.46058577,4 1.07016829,4 0.3,4 L0.3,5 C1.07550163,5 1.46591911,5 1.47125244,5 C3.5,5 3.5,4 3.5,3.548 C3.5,2.91607666 3.02026367,2.42071533 2.15869141,2.14685059 C1.29711914,1.87298584 0.972767969,1.86999512 0.972767969,1.50152588 Z" transform="translate(11 10)"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<polygon fill="#F4AF3D" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>
|
||||
<polygon fill="#9AA7B0" fill-opacity=".8" points="7 1 3 5 7 5"/>
|
||||
<polygon fill="#9AA7B0" fill-opacity=".8" points="8 1 8 6 3 6 3 8 13 8 13 1"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M1.39509277,3.58770752 C1.62440186,3.83789062 1.83782861,4 2.28682861,4 C2.81318359,4 3,3.58770752 3,3.29760742 L3,0 L4,0 L4,3.58770752 C4,4.31964111 3.32670898,5 2.45,5 C1.629,5 1.15,4.76264111 0.8,4.31964111 L1.39509277,3.58770752 Z" transform="translate(1 10)"/>
|
||||
<path fill="#231F20" fill-opacity=".7" d="M0.972767969,1.50152588 C0.972767969,1.13305664 1.284,1 1.845,1 C1.85033333,1 2.23533333,1 3,1 L3,0 C2.26266667,0 1.88266667,0 1.86,0 C0.778,0 0,0.45916748 0,1.45 C0,2.31452637 0.419555664,2.69049072 1.47125244,2.91607666 C2.24158869,3.08131157 2.496155,3.22862939 2.496155,3.548 C2.496155,3.86737061 2.13842773,4 1.47125244,4 C1.46058577,4 1.07016829,4 0.3,4 L0.3,5 C1.07550163,5 1.46591911,5 1.47125244,5 C3.5,5 3.5,4 3.5,3.548 C3.5,2.91607666 3.02026367,2.42071533 2.15869141,2.14685059 C1.29711914,1.87298584 0.972767969,1.86999512 0.972767969,1.50152588 Z" transform="translate(6 10)"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<polygon fill="#F26522" fill-opacity=".7" points="1 16 16 16 16 9 1 9"/>
|
||||
<polygon fill="#9AA7B0" fill-opacity=".8" points="7 1 3 5 7 5"/>
|
||||
<polygon fill="#9AA7B0" fill-opacity=".8" points="8 1 8 6 3 6 3 8 13 8 13 1"/>
|
||||
<polygon fill="#231F20" fill-opacity=".7" points="0 0 1 0 1 2 3 2 3 0 4 0 4 5 3 5 3 3 1 3 1 5 0 5" transform="translate(3 10)"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 498 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
<path fill="#EDA200" fill-rule="evenodd" d="M16,2 L31,28 L1,28 L16,2 Z M18,25 L18,21 L14,21 L14,25 L18,25 Z M18,18 L18,10 L14,10 L14,18 L18,18 Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 241 B |
@@ -17,6 +17,7 @@
|
||||
package com.formdev.flatlaf.testing.extras;
|
||||
|
||||
import javax.swing.*;
|
||||
import com.formdev.flatlaf.FlatIconColors;
|
||||
import com.formdev.flatlaf.extras.*;
|
||||
import com.formdev.flatlaf.testing.*;
|
||||
import net.miginfocom.swing.*;
|
||||
@@ -30,6 +31,7 @@ public class FlatExtrasTest
|
||||
public static void main( String[] args ) {
|
||||
SwingUtilities.invokeLater( () -> {
|
||||
FlatTestFrame frame = FlatTestFrame.create( args, "FlatExtrasTest" );
|
||||
System.out.println( UIManager.getColor( FlatIconColors.ACTIONS_GREY.key ) );
|
||||
frame.showFrame( FlatExtrasTest::new );
|
||||
} );
|
||||
}
|
||||
@@ -39,6 +41,29 @@ public class FlatExtrasTest
|
||||
|
||||
triStateLabel1.setText( triStateCheckBox1.getState().toString() );
|
||||
triStateLabel2.setText( triStateCheckBox2.getState().toString() );
|
||||
|
||||
addSVGIcon( "actions/copy.svg" );
|
||||
addSVGIcon( "actions/colors.svg" );
|
||||
addSVGIcon( "actions/execute.svg" );
|
||||
addSVGIcon( "actions/suspend.svg" );
|
||||
addSVGIcon( "actions/intentionBulb.svg" );
|
||||
addSVGIcon( "actions/quickfixOffBulb.svg" );
|
||||
|
||||
addSVGIcon( "objects/abstractClass.svg" );
|
||||
addSVGIcon( "objects/abstractMethod.svg" );
|
||||
addSVGIcon( "objects/annotationtype.svg" );
|
||||
addSVGIcon( "objects/annotationtype.svg" );
|
||||
addSVGIcon( "objects/css.svg" );
|
||||
addSVGIcon( "objects/javaScript.svg" );
|
||||
addSVGIcon( "objects/xhtml.svg" );
|
||||
|
||||
addSVGIcon( "errorDialog.svg" );
|
||||
addSVGIcon( "informationDialog.svg" );
|
||||
addSVGIcon( "warningDialog.svg" );
|
||||
}
|
||||
|
||||
private void addSVGIcon( String name ) {
|
||||
svgIconsPanel.add( new JLabel( new FlatSVGIcon( "com/formdev/flatlaf/demo/extras/svg/" + name ) ) );
|
||||
}
|
||||
|
||||
private void triStateCheckBox1Changed() {
|
||||
@@ -56,6 +81,9 @@ public class FlatExtrasTest
|
||||
triStateLabel1 = new JLabel();
|
||||
triStateCheckBox2 = new TriStateCheckBox();
|
||||
triStateLabel2 = new JLabel();
|
||||
label2 = new JLabel();
|
||||
svgIconsPanel = new JPanel();
|
||||
label3 = new JLabel();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
@@ -66,6 +94,8 @@ public class FlatExtrasTest
|
||||
"[left]",
|
||||
// rows
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]"));
|
||||
|
||||
//---- label1 ----
|
||||
@@ -90,6 +120,25 @@ public class FlatExtrasTest
|
||||
//---- triStateLabel2 ----
|
||||
triStateLabel2.setText("text");
|
||||
add(triStateLabel2, "cell 2 1");
|
||||
|
||||
//---- label2 ----
|
||||
label2.setText("SVG Icons:");
|
||||
add(label2, "cell 0 2");
|
||||
|
||||
//======== svgIconsPanel ========
|
||||
{
|
||||
svgIconsPanel.setLayout(new MigLayout(
|
||||
"insets 0,hidemode 3",
|
||||
// columns
|
||||
"[fill]",
|
||||
// rows
|
||||
"[grow,center]"));
|
||||
}
|
||||
add(svgIconsPanel, "cell 1 2 2 1");
|
||||
|
||||
//---- label3 ----
|
||||
label3.setText("The icons may change colors when switching to another theme.");
|
||||
add(label3, "cell 1 3 2 1");
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||
}
|
||||
|
||||
@@ -99,5 +148,8 @@ public class FlatExtrasTest
|
||||
private JLabel triStateLabel1;
|
||||
private TriStateCheckBox triStateCheckBox2;
|
||||
private JLabel triStateLabel2;
|
||||
private JLabel label2;
|
||||
private JPanel svgIconsPanel;
|
||||
private JLabel label3;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8"
|
||||
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
@@ -6,7 +6,7 @@ new FormModel {
|
||||
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
|
||||
"$columnConstraints": "[][][left]"
|
||||
"$rowConstraints": "[][]"
|
||||
"$rowConstraints": "[][][][]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
@@ -42,9 +42,30 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 2 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label2"
|
||||
"text": "SVG Icons:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 2"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "insets 0,hidemode 3"
|
||||
"$columnConstraints": "[fill]"
|
||||
"$rowConstraints": "[grow,center]"
|
||||
} ) {
|
||||
name: "svgIconsPanel"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 2 2 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label3"
|
||||
"text": "The icons may change colors when switching to another theme."
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 3 2 1"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 400, 300 )
|
||||
"size": new java.awt.Dimension( 500, 300 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
||||