mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 07:17:13 -06:00
EditorPane, TextArea and TextPane implemented
This commit is contained in:
@@ -97,11 +97,14 @@ public abstract class FlatLaf
|
||||
// but are not set in MetalLookAndFeel or BasicLookAndFeel
|
||||
Color control = defaults.getColor( "control" );
|
||||
defaults.put( "EditorPane.disabledBackground", control );
|
||||
defaults.put( "EditorPane.inactiveBackground", control );
|
||||
defaults.put( "FormattedTextField.disabledBackground", control );
|
||||
defaults.put( "PasswordField.disabledBackground", control );
|
||||
defaults.put( "TextArea.disabledBackground", control );
|
||||
defaults.put( "TextArea.inactiveBackground", control );
|
||||
defaults.put( "TextField.disabledBackground", control );
|
||||
defaults.put( "TextPane.disabledBackground", control );
|
||||
defaults.put( "TextPane.inactiveBackground", control );
|
||||
|
||||
initFonts( defaults );
|
||||
loadDefaultsFromProperties( defaults );
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2019 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
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.formdev.flatlaf.ui;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicEditorPaneUI;
|
||||
|
||||
/**
|
||||
* Provides the Flat LaF UI delegate for {@link javax.swing.JEditorPane}.
|
||||
*
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
public class FlatEditorPaneUI
|
||||
extends BasicEditorPaneUI
|
||||
{
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
return new FlatEditorPaneUI();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2019 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
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.formdev.flatlaf.ui;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicTextAreaUI;
|
||||
|
||||
/**
|
||||
* Provides the Flat LaF UI delegate for {@link javax.swing.JTextArea}.
|
||||
*
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
public class FlatTextAreaUI
|
||||
extends BasicTextAreaUI
|
||||
{
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
return new FlatTextAreaUI();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2019 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
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.formdev.flatlaf.ui;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicTextPaneUI;
|
||||
|
||||
/**
|
||||
* Provides the Flat LaF UI delegate for {@link javax.swing.JTextPane}.
|
||||
*
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
public class FlatTextPaneUI
|
||||
extends BasicTextPaneUI
|
||||
{
|
||||
public static ComponentUI createUI( JComponent c ) {
|
||||
return new FlatTextPaneUI();
|
||||
}
|
||||
}
|
||||
@@ -18,12 +18,20 @@
|
||||
|
||||
ButtonUI=com.formdev.flatlaf.ui.FlatButtonUI
|
||||
CheckBoxUI=com.formdev.flatlaf.ui.FlatCheckBoxUI
|
||||
EditorPaneUI=com.formdev.flatlaf.ui.FlatEditorPaneUI
|
||||
FormattedTextFieldUI=com.formdev.flatlaf.ui.FlatFormattedTextFieldUI
|
||||
LabelUI=com.formdev.flatlaf.ui.FlatLabelUI
|
||||
PasswordFieldUI=com.formdev.flatlaf.ui.FlatPasswordFieldUI
|
||||
RadioButtonUI=com.formdev.flatlaf.ui.FlatRadioButtonUI
|
||||
ScrollPaneUI=com.formdev.flatlaf.ui.FlatScrollPaneUI
|
||||
TextAreaUI=com.formdev.flatlaf.ui.FlatTextAreaUI
|
||||
TextFieldUI=com.formdev.flatlaf.ui.FlatTextFieldUI
|
||||
TextPaneUI=com.formdev.flatlaf.ui.FlatTextPaneUI
|
||||
|
||||
|
||||
#---- variables ----
|
||||
|
||||
@textComponentMargin=2,6,2,6
|
||||
|
||||
|
||||
#---- Button ----
|
||||
@@ -44,18 +52,25 @@ Component.focusWidth=2
|
||||
Component.arc=5
|
||||
|
||||
|
||||
#---- EditorPane ----
|
||||
|
||||
EditorPane.border=com.formdev.flatlaf.ui.FlatMarginBorder
|
||||
EditorPane.background=@textComponentBackground
|
||||
EditorPane.margin=@textComponentMargin
|
||||
|
||||
|
||||
#---- FormattedTextField ----
|
||||
|
||||
FormattedTextField.border=com.formdev.flatlaf.ui.FlatBorder
|
||||
FormattedTextField.background=@textComponentBackground
|
||||
FormattedTextField.margin=2,6,2,6
|
||||
FormattedTextField.margin=@textComponentMargin
|
||||
|
||||
|
||||
#---- PasswordField ----
|
||||
|
||||
PasswordField.border=com.formdev.flatlaf.ui.FlatBorder
|
||||
PasswordField.background=@textComponentBackground
|
||||
PasswordField.margin=2,6,2,6
|
||||
PasswordField.margin=@textComponentMargin
|
||||
|
||||
|
||||
#---- RadioButton ----
|
||||
@@ -69,8 +84,21 @@ RadioButton.icon=com.formdev.flatlaf.ui.FlatRadioButtonIcon
|
||||
ScrollPane.border=com.formdev.flatlaf.ui.FlatBorder
|
||||
|
||||
|
||||
#---- TextArea ----
|
||||
|
||||
TextArea.border=com.formdev.flatlaf.ui.FlatMarginBorder
|
||||
TextArea.background=@textComponentBackground
|
||||
TextArea.margin=@textComponentMargin
|
||||
|
||||
#---- TextField ----
|
||||
|
||||
TextField.border=com.formdev.flatlaf.ui.FlatBorder
|
||||
TextField.background=@textComponentBackground
|
||||
TextField.margin=2,6,2,6
|
||||
TextField.margin=@textComponentMargin
|
||||
|
||||
|
||||
#---- TextPane ----
|
||||
|
||||
TextPane.border=com.formdev.flatlaf.ui.FlatMarginBorder
|
||||
TextPane.background=@textComponentBackground
|
||||
TextPane.margin=@textComponentMargin
|
||||
|
||||
Reference in New Issue
Block a user