Package com.formdev.flatlaf.themeeditor
Class FlatThemeEditorPane
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- com.formdev.flatlaf.themeeditor.FlatThemeEditorPane
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
class FlatThemeEditorPane extends javax.swing.JPanel
A pane that supports editing FlatLaf themes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FlatThemeEditorPane.FlatSyntaxScheme
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
DIRTY_PROPERTY
private javax.swing.JPanel
editorPanel
private org.fife.ui.rsyntaxtextarea.ErrorStrip
errorStrip
private java.io.File
file
private FlatFindReplaceBar
findReplaceBar
private static org.fife.ui.rtextarea.SearchContext
findReplaceContext
private static boolean
findReplaceVisible
private static java.lang.String
FLATLAF_STYLE
private FlatThemePreview
preview
private org.fife.ui.rtextarea.RTextScrollPane
scrollPane
private FlatSyntaxTextArea
textArea
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description FlatThemeEditorPane()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.awt.Font
createEditorFont(int sizeIncr)
(package private) java.io.File
getFile()
private java.lang.String
getWindowTitle()
(package private) void
hideFindReplaceBar()
(package private) void
initBasePropertyProvider(FlatThemePropertiesBaseManager propertiesBaseManager)
(package private) boolean
isDirty()
private static boolean
isFallbackFont(java.awt.Font font)
(package private) void
load(java.io.File file)
(package private) void
notifyTextAreaAction(java.lang.String actionKey)
(package private) boolean
reloadIfNecessary()
boolean
requestFocusInWindow()
(package private) boolean
saveIfDirty()
(package private) void
selected()
(package private) void
showFindReplaceBar(boolean findEditorSelection)
(package private) void
showPreview(boolean show)
(package private) void
updateFontSize(int sizeIncr)
(package private) void
updateTheme()
(package private) void
windowActivated()
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
DIRTY_PROPERTY
static final java.lang.String DIRTY_PROPERTY
- See Also:
- Constant Field Values
-
FLATLAF_STYLE
private static final java.lang.String FLATLAF_STYLE
- See Also:
- Constant Field Values
-
findReplaceVisible
private static boolean findReplaceVisible
-
findReplaceContext
private static org.fife.ui.rtextarea.SearchContext findReplaceContext
-
editorPanel
private final javax.swing.JPanel editorPanel
-
scrollPane
private final org.fife.ui.rtextarea.RTextScrollPane scrollPane
-
textArea
private final FlatSyntaxTextArea textArea
-
errorStrip
private final org.fife.ui.rsyntaxtextarea.ErrorStrip errorStrip
-
findReplaceBar
private FlatFindReplaceBar findReplaceBar
-
preview
private FlatThemePreview preview
-
file
private java.io.File file
-
-
Method Detail
-
updateTheme
void updateTheme()
-
updateFontSize
void updateFontSize(int sizeIncr)
-
createEditorFont
private static java.awt.Font createEditorFont(int sizeIncr)
-
isFallbackFont
private static boolean isFallbackFont(java.awt.Font font)
-
selected
void selected()
-
windowActivated
void windowActivated()
-
requestFocusInWindow
public boolean requestFocusInWindow()
- Overrides:
requestFocusInWindow
in classjavax.swing.JComponent
-
initBasePropertyProvider
void initBasePropertyProvider(FlatThemePropertiesBaseManager propertiesBaseManager)
-
getFile
java.io.File getFile()
-
load
void load(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
reloadIfNecessary
boolean reloadIfNecessary()
-
saveIfDirty
boolean saveIfDirty()
-
isDirty
boolean isDirty()
-
getWindowTitle
private java.lang.String getWindowTitle()
-
showFindReplaceBar
void showFindReplaceBar(boolean findEditorSelection)
-
hideFindReplaceBar
void hideFindReplaceBar()
-
showPreview
void showPreview(boolean show)
-
notifyTextAreaAction
void notifyTextAreaAction(java.lang.String actionKey)
-
-