Extras: Renamed tri-state check box class from

`com.formdev.flatlaf.extras.TriStateCheckBox` to
`com.formdev.flatlaf.extras.components.FlatTriStateCheckBox`
This commit is contained in:
Karl Tauber
2020-12-12 00:33:51 +01:00
parent 534384438b
commit 234003e2b1
13 changed files with 41 additions and 30 deletions

View File

@@ -22,9 +22,9 @@ import java.awt.event.MouseEvent;
import javax.swing.*;
import javax.swing.border.*;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.extras.TriStateCheckBox;
import com.formdev.flatlaf.extras.components.FlatTabbedPane;
import com.formdev.flatlaf.extras.components.FlatTabbedPane.*;
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox;
import com.formdev.flatlaf.icons.FlatInternalFrameCloseIcon;
import com.formdev.flatlaf.util.ScaledImageIcon;
import com.jgoodies.forms.layout.*;
@@ -450,7 +450,7 @@ public class FlatContainerTest
tabsClosableCheckBox = new JCheckBox();
JLabel tabPlacementLabel = new JLabel();
tabPlacementField = new FlatTestEnumComboBox<>();
secondTabClosableCheckBox = new TriStateCheckBox();
secondTabClosableCheckBox = new FlatTriStateCheckBox();
JLabel tabAreaAlignmentLabel = new JLabel();
tabAreaAlignmentField = new FlatTestEnumComboBox<>();
tabAlignmentField = new FlatTestEnumComboBox<>();
@@ -795,7 +795,7 @@ public class FlatContainerTest
private FlatTestEnumComboBox<ScrollButtonsPlacement> scrollButtonsPlacementField;
private JCheckBox tabsClosableCheckBox;
private FlatTestEnumComboBox<TabPlacement> tabPlacementField;
private TriStateCheckBox secondTabClosableCheckBox;
private FlatTriStateCheckBox secondTabClosableCheckBox;
private FlatTestEnumComboBox<TabAreaAlignment> tabAreaAlignmentField;
private FlatTestEnumComboBox<TabAlignment> tabAlignmentField;
private FlatTestEnumComboBox<TabWidthMode> tabWidthModeField;

View File

@@ -320,7 +320,7 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 4"
} )
add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) {
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
name: "secondTabClosableCheckBox"
"text": "Second Tab closable"
auxiliary() {

View File

@@ -19,7 +19,7 @@ package com.formdev.flatlaf.testing;
import java.awt.*;
import java.beans.PropertyVetoException;
import javax.swing.*;
import com.formdev.flatlaf.extras.TriStateCheckBox;
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox;
import com.formdev.flatlaf.icons.FlatFileViewFloppyDriveIcon;
import com.formdev.flatlaf.util.UIScale;
import net.miginfocom.swing.*;
@@ -63,9 +63,9 @@ public class FlatInternalFrameTest
maximizableCheckBox.isSelected(),
iconifiableCheckBox.isSelected() );
if( iconCheckBox.getState() == TriStateCheckBox.State.SELECTED )
if( iconCheckBox.getState() == FlatTriStateCheckBox.State.SELECTED )
internalFrame.setFrameIcon( new FlatFileViewFloppyDriveIcon() );
else if( iconCheckBox.getState() == TriStateCheckBox.State.UNSELECTED )
else if( iconCheckBox.getState() == FlatTriStateCheckBox.State.UNSELECTED )
internalFrame.setFrameIcon( null );
if( menuBarCheckBox.isSelected() ) {
@@ -115,7 +115,7 @@ public class FlatInternalFrameTest
closableCheckBox = new JCheckBox();
iconifiableCheckBox = new JCheckBox();
maximizableCheckBox = new JCheckBox();
iconCheckBox = new TriStateCheckBox();
iconCheckBox = new FlatTriStateCheckBox();
menuBarCheckBox = new JCheckBox();
titleLabel = new JLabel();
titleField = new JTextField();
@@ -207,7 +207,7 @@ public class FlatInternalFrameTest
private JCheckBox closableCheckBox;
private JCheckBox iconifiableCheckBox;
private JCheckBox maximizableCheckBox;
private TriStateCheckBox iconCheckBox;
private FlatTriStateCheckBox iconCheckBox;
private JCheckBox menuBarCheckBox;
private JLabel titleLabel;
private JTextField titleField;

View File

@@ -50,7 +50,7 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1,alignx left,growx 0"
} )
add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) {
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
name: "iconCheckBox"
"text": "Frame icon"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {

View File

@@ -43,7 +43,8 @@ import com.formdev.flatlaf.demo.LookAndFeelsComboBox;
import com.formdev.flatlaf.demo.DemoPrefs;
import com.formdev.flatlaf.demo.intellijthemes.*;
import com.formdev.flatlaf.extras.*;
import com.formdev.flatlaf.extras.TriStateCheckBox.State;
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox;
import com.formdev.flatlaf.extras.components.FlatTriStateCheckBox.State;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.SystemInfo;
import com.formdev.flatlaf.util.UIScale;
@@ -660,7 +661,7 @@ public class FlatTestFrame
inspectCheckBox = new JCheckBox();
explicitColorsCheckBox = new JCheckBox();
backgroundCheckBox = new JCheckBox();
opaqueTriStateCheckBox = new TriStateCheckBox();
opaqueTriStateCheckBox = new FlatTriStateCheckBox();
sizeVariantComboBox = new JComboBox<>();
closeButton = new JButton();
themesPanel = new IJThemesPanel();
@@ -805,7 +806,7 @@ public class FlatTestFrame
private JCheckBox inspectCheckBox;
private JCheckBox explicitColorsCheckBox;
private JCheckBox backgroundCheckBox;
private TriStateCheckBox opaqueTriStateCheckBox;
private FlatTriStateCheckBox opaqueTriStateCheckBox;
private JComboBox<String> sizeVariantComboBox;
private JButton closeButton;
private IJThemesPanel themesPanel;

View File

@@ -107,7 +107,7 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 7 0"
} )
add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) {
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
name: "opaqueTriStateCheckBox"
"text": "opaque"
"mnemonic": 79

View File

@@ -18,6 +18,7 @@ package com.formdev.flatlaf.testing.extras;
import javax.swing.*;
import com.formdev.flatlaf.extras.*;
import com.formdev.flatlaf.extras.components.*;
import com.formdev.flatlaf.testing.*;
import net.miginfocom.swing.*;
@@ -117,9 +118,9 @@ public class FlatExtrasTest
private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
label1 = new JLabel();
triStateCheckBox1 = new TriStateCheckBox();
triStateCheckBox1 = new FlatTriStateCheckBox();
triStateLabel1 = new JLabel();
triStateCheckBox2 = new TriStateCheckBox();
triStateCheckBox2 = new FlatTriStateCheckBox();
triStateLabel2 = new JLabel();
label2 = new JLabel();
svgIconsPanel = new JPanel();
@@ -238,9 +239,9 @@ public class FlatExtrasTest
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JLabel label1;
private TriStateCheckBox triStateCheckBox1;
private FlatTriStateCheckBox triStateCheckBox1;
private JLabel triStateLabel1;
private TriStateCheckBox triStateCheckBox2;
private FlatTriStateCheckBox triStateCheckBox2;
private JLabel triStateLabel2;
private JLabel label2;
private JPanel svgIconsPanel;

View File

@@ -15,7 +15,7 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 0"
} )
add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) {
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
name: "triStateCheckBox1"
"text": "three states"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "triStateCheckBox1Changed", false ) )
@@ -29,7 +29,7 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 0,gapx 30"
} )
add( new FormComponent( "com.formdev.flatlaf.extras.TriStateCheckBox" ) {
add( new FormComponent( "com.formdev.flatlaf.extras.components.FlatTriStateCheckBox" ) {
name: "triStateCheckBox2"
"text": "third state disabled"
"thirdStateEnabled": false