Java Swing UI 属性列表?

发布于 2024-08-16 06:21:50 字数 1539 浏览 8 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

尬尬 2024-08-23 06:21:50

我找到了 Nimbus 外观中使用的资源键的官方列表:

http://docs。 oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html

以及官方组件属性:

http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html

这是另一个令人筋疲力尽的列表(与 Nimbus 无关)。 这是来源

AbstractButton.clickText
AbstractDocument.additionText
AbstractDocument.deletionText
AbstractDocument.redoText
AbstractDocument.styleChangeText
AbstractDocument.undoText
AbstractUndoableEdit.redoText
AbstractUndoableEdit.undoText
AuditoryCues.allAuditoryCues
AuditoryCues.cueList
AuditoryCues.noAuditoryCues
Button.background
Button.border
Button.darkShadow
Button.defaultButtonFollowsFocus
Button.disabledText
Button.focusInputMap
Button.font
Button.foreground
Button.highlight
Button.light
Button.margin
Button.opaque
Button.select
Button.shadow
Button.textIconGap
Button.textShiftOffset
ButtonUI
CheckBox.background
CheckBox.border
CheckBox.disabledText
CheckBox.focusInputMap
CheckBox.font
CheckBox.foreground
CheckBox.icon
CheckBox.margin
CheckBox.select
CheckBox.textIconGap
CheckBox.textShiftOffset
CheckBoxMenuItem.acceleratorDelimiter
CheckBoxMenuItem.acceleratorFont
CheckBoxMenuItem.acceleratorForeground
CheckBoxMenuItem.acceleratorSelectionForeground
CheckBoxMenuItem.arrowIcon
CheckBoxMenuItem.background
CheckBoxMenuItem.border
CheckBoxMenuItem.borderPainted
CheckBoxMenuItem.checkIcon
CheckBoxMenuItem.dashIcon
CheckBoxMenuItem.disabledBackground
CheckBoxMenuItem.disabledForeground
CheckBoxMenuItem.font
CheckBoxMenuItem.foreground
CheckBoxMenuItem.margin
CheckBoxMenuItem.selectionBackground
CheckBoxMenuItem.selectionForeground
CheckBoxMenuItemUI
CheckBoxUI
ColorChooser.background
ColorChooser.cancelText
ColorChooser.font
ColorChooser.foreground
ColorChooser.hsbBlueText
ColorChooser.hsbBrightnessText
ColorChooser.hsbDisplayedMnemonicIndex
ColorChooser.hsbGreenText
ColorChooser.hsbHueText
ColorChooser.hsbMnemonic
ColorChooser.hsbNameText
ColorChooser.hsbRedText
ColorChooser.hsbSaturationText
ColorChooser.okText
ColorChooser.previewText
ColorChooser.resetMnemonic
ColorChooser.resetText
ColorChooser.rgbBlueMnemonic
ColorChooser.rgbBlueText
ColorChooser.rgbDisplayedMnemonicIndex
ColorChooser.rgbGreenMnemonic
ColorChooser.rgbGreenText
ColorChooser.rgbMnemonic
ColorChooser.rgbNameText
ColorChooser.rgbRedMnemonic
ColorChooser.rgbRedText
ColorChooser.sampleText
ColorChooser.swatchesDefaultRecentColor
ColorChooser.swatchesDisplayedMnemonicIndex
ColorChooser.swatchesMnemonic
ColorChooser.swatchesNameText
ColorChooser.swatchesRecentSwatchSize
ColorChooser.swatchesRecentText
ColorChooser.swatchesSwatchSize
ColorChooserUI
ComboBox.ancestorInputMap
ComboBox.background
ComboBox.buttonBackground
ComboBox.buttonDarkShadow
ComboBox.buttonHighlight
ComboBox.buttonShadow
ComboBox.disabledBackground
ComboBox.disabledForeground
ComboBox.font
ComboBox.foreground
ComboBox.isEnterSelectablePopup
ComboBox.selectionBackground
ComboBox.selectionForeground
ComboBox.timeFactor
ComboBox.togglePopupText
ComboBoxUI
Desktop.ancestorInputMap
Desktop.background
Desktop.minOnScreenInsets
DesktopIcon.border
DesktopIconUI
DesktopPaneUI
EditorPane.background
EditorPane.border
EditorPane.caretBlinkRate
EditorPane.caretForeground
EditorPane.focusInputMap
EditorPane.font
EditorPane.foreground
EditorPane.inactiveBackground
EditorPane.inactiveForeground
EditorPane.margin
EditorPane.selectionBackground
EditorPane.selectionForeground
EditorPaneUI
FileChooser.acceptAllFileFilterText
FileChooser.ancestorInputMap
FileChooser.byDateText
FileChooser.byNameText
FileChooser.cancelButtonMnemonic
FileChooser.cancelButtonText
FileChooser.chooseButtonText
FileChooser.createButtonText
FileChooser.desktopName
FileChooser.detailsViewIcon
FileChooser.directoryDescriptionText
FileChooser.directoryOpenButtonMnemonic
FileChooser.directoryOpenButtonText
FileChooser.fileDescriptionText
FileChooser.fileNameLabelMnemonic
FileChooser.fileNameLabelText
FileChooser.fileSizeGigaBytes
FileChooser.fileSizeKiloBytes
FileChooser.fileSizeMegaBytes
FileChooser.filesOfTypeLabelMnemonic
FileChooser.filesOfTypeLabelText
FileChooser.helpButtonMnemonic
FileChooser.helpButtonText
FileChooser.homeFolderIcon
FileChooser.listViewIcon
FileChooser.lookInLabelMnemonic
FileChooser.mac.newFolder
FileChooser.mac.newFolder.subsequent
FileChooser.newFolderAccessibleName
FileChooser.newFolderButtonText
FileChooser.newFolderErrorSeparator
FileChooser.newFolderErrorText
FileChooser.newFolderExistsErrorText
FileChooser.newFolderIcon
FileChooser.newFolderPromptText
FileChooser.newFolderTitleText
FileChooser.openButtonMnemonic
FileChooser.openButtonText
FileChooser.openDialogTitleText
FileChooser.openTitleText
FileChooser.readOnly
FileChooser.saveButtonMnemonic
FileChooser.saveButtonText
FileChooser.saveDialogFileNameLabelText
FileChooser.saveDialogTitleText
FileChooser.saveTitleText
FileChooser.untitledFileName
FileChooser.untitledFolderName
FileChooser.upFolderIcon
FileChooser.updateButtonMnemonic
FileChooser.updateButtonText
FileChooser.useSystemExtensionHiding
FileChooser.usesSingleFilePane
FileChooserUI
FileView.computerIcon
FileView.directoryIcon
FileView.fileIcon
FileView.floppyDriveIcon
FileView.hardDriveIcon
Focus.color
FormView.browseFileButtonText
FormView.resetButtonText
FormView.submitButtonText
FormattedTextField.background
FormattedTextField.border
FormattedTextField.caretBlinkRate
FormattedTextField.caretForeground
FormattedTextField.focusInputMap
FormattedTextField.font
FormattedTextField.foreground
FormattedTextField.inactiveBackground
FormattedTextField.inactiveForeground
FormattedTextField.margin
FormattedTextField.selectionBackground
FormattedTextField.selectionForeground
FormattedTextFieldUI
IconButton.font
InsetBorder.aquaVariant
InternalFrame.activeTitleBackground
InternalFrame.activeTitleForeground
InternalFrame.background
InternalFrame.borderColor
InternalFrame.borderDarkShadow
InternalFrame.borderHighlight
InternalFrame.borderLight
InternalFrame.borderShadow
InternalFrame.closeButtonToolTip
InternalFrame.closeIcon
InternalFrame.iconButtonToolTip
InternalFrame.iconifyIcon
InternalFrame.inactiveTitleBackground
InternalFrame.inactiveTitleForeground
InternalFrame.maxButtonToolTip
InternalFrame.maximizeIcon
InternalFrame.minimizeIcon
InternalFrame.opaque
InternalFrame.optionDialogBackground
InternalFrame.optionDialogTitleFont
InternalFrame.paletteBackground
InternalFrame.paletteTitleFont
InternalFrame.restoreButtonToolTip
InternalFrame.titleFont
InternalFrame.windowBindings
InternalFrameTitlePane.closeButtonAccessibleName
InternalFrameTitlePane.closeButtonOpacity
InternalFrameTitlePane.closeButtonText
InternalFrameTitlePane.iconifyButtonAccessibleName
InternalFrameTitlePane.iconifyButtonOpacity
InternalFrameTitlePane.maximizeButtonAccessibleName
InternalFrameTitlePane.maximizeButtonOpacity
InternalFrameTitlePane.maximizeButtonText
InternalFrameTitlePane.minimizeButtonText
InternalFrameTitlePane.moveButtonText
InternalFrameTitlePane.restoreButtonText
InternalFrameTitlePane.sizeButtonText
InternalFrameUI
IsindexView.prompt
Label.background
Label.disabledForeground
Label.disabledShadow
Label.font
Label.foreground
Label.opaque
LabelUI
List.background
List.cellRenderer
List.dropLineColor
List.evenRowBackgroundPainter
List.focusCellHighlightBorder
List.focusInputMap
List.focusInputMap.RightToLeft
List.font
List.foreground
List.oddRowBackgroundPainter
List.selectionBackground
List.selectionForeground
List.sourceListBackgroundPainter
List.sourceListFocusedSelectionBackgroundPainter
List.sourceListSelectionBackgroundPainter
List.timeFactor
ListUI
Menu.acceleratorFont
Menu.acceleratorForeground
Menu.acceleratorSelectionForeground
Menu.arrowIcon
Menu.background
Menu.border
Menu.borderPainted
Menu.checkIcon
Menu.consumesTabs
Menu.crossMenuMnemonic
Menu.disabledBackground
Menu.disabledForeground
Menu.font
Menu.foreground
Menu.margin
Menu.menuPopupOffsetX
Menu.menuPopupOffsetY
Menu.selectionBackground
Menu.selectionForeground
Menu.shortcutKeys
Menu.submenuPopupOffsetX
Menu.submenuPopupOffsetY
MenuBar.background
MenuBar.backgroundPainter
MenuBar.border
MenuBar.disabledBackground
MenuBar.disabledForeground
MenuBar.font
MenuBar.foreground
MenuBar.highlight
MenuBar.margin
MenuBar.selectedBackgroundPainter
MenuBar.selectionBackground
MenuBar.selectionForeground
MenuBar.shadow
MenuBar.windowBindings
MenuBarUI
MenuItem.acceleratorDelimiter
MenuItem.acceleratorFont
MenuItem.acceleratorForeground
MenuItem.acceleratorSelectionForeground
MenuItem.arrowIcon
MenuItem.background
MenuItem.border
MenuItem.borderPainted
MenuItem.checkIcon
MenuItem.disabledBackground
MenuItem.disabledForeground
MenuItem.font
MenuItem.foreground
MenuItem.margin
MenuItem.selectedBackgroundPainter
MenuItem.selectionBackground
MenuItem.selectionForeground
MenuItemUI
MenuUI
OptionPane.background
OptionPane.border
OptionPane.buttonAreaBorder
OptionPane.buttonClickThreshhold
OptionPane.buttonFont
OptionPane.cancelButtonMnemonic
OptionPane.cancelButtonText
OptionPane.errorIcon
OptionPane.font
OptionPane.foreground
OptionPane.informationIcon
OptionPane.inputDialogTitle
OptionPane.messageAreaBorder
OptionPane.messageDialogTitle
OptionPane.messageFont
OptionPane.messageForeground
OptionPane.minimumSize
OptionPane.noButtonMnemonic
OptionPane.noButtonText
OptionPane.okButtonMnemonic
OptionPane.okButtonText
OptionPane.questionIcon
OptionPane.titleText
OptionPane.warningIcon
OptionPane.windowBindings
OptionPane.yesButtonMnemonic
OptionPane.yesButtonText
OptionPaneUI
Panel.background
Panel.font
Panel.foreground
Panel.opaque
PanelUI
PasswordField.background
PasswordField.border
PasswordField.caretBlinkRate
PasswordField.caretForeground
PasswordField.echoChar
PasswordField.focusInputMap
PasswordField.font
PasswordField.foreground
PasswordField.inactiveBackground
PasswordField.inactiveForeground
PasswordField.margin
PasswordField.selectionBackground
PasswordField.selectionForeground
PasswordFieldUI
PopupMenu.background
PopupMenu.border
PopupMenu.consumeEventOnClose
PopupMenu.font
PopupMenu.foreground
PopupMenu.selectedWindowInputMapBindings
PopupMenu.selectedWindowInputMapBindings.RightToLeft
PopupMenu.selectionBackground
PopupMenu.selectionForeground
PopupMenuSeparatorUI
PopupMenuUI
PrintingDialog.abortButtonDisplayedMnemonicIndex
PrintingDialog.abortButtonMnemonic
PrintingDialog.abortButtonText
PrintingDialog.abortButtonToolTipText
PrintingDialog.contentAbortingText
PrintingDialog.contentInitialText
PrintingDialog.contentProgressText
PrintingDialog.titleAbortingText
PrintingDialog.titleProgressText
ProgressBar.background
ProgressBar.border
ProgressBar.cellLength
ProgressBar.cellSpacing
ProgressBar.cycleTime
ProgressBar.font
ProgressBar.foreground
ProgressBar.horizontalSize
ProgressBar.repaintInterval
ProgressBar.selectionBackground
ProgressBar.selectionForeground
ProgressBar.verticalSize
ProgressBarUI
ProgressMonitor.progressText
RadioButton.background
RadioButton.border
RadioButton.darkShadow
RadioButton.disabledText
RadioButton.focusInputMap
RadioButton.font
RadioButton.foreground
RadioButton.highlight
RadioButton.icon
RadioButton.light
RadioButton.margin
RadioButton.select
RadioButton.shadow
RadioButton.textIconGap
RadioButton.textShiftOffset
RadioButtonMenuItem.acceleratorDelimiter
RadioButtonMenuItem.acceleratorFont
RadioButtonMenuItem.acceleratorForeground
RadioButtonMenuItem.acceleratorSelectionForeground
RadioButtonMenuItem.arrowIcon
RadioButtonMenuItem.background
RadioButtonMenuItem.border
RadioButtonMenuItem.borderPainted
RadioButtonMenuItem.checkIcon
RadioButtonMenuItem.dashIcon
RadioButtonMenuItem.disabledBackground
RadioButtonMenuItem.disabledForeground
RadioButtonMenuItem.font
RadioButtonMenuItem.foreground
RadioButtonMenuItem.margin
RadioButtonMenuItem.selectionBackground
RadioButtonMenuItem.selectionForeground
RadioButtonMenuItemUI
RadioButtonUI
RootPane.ancestorInputMap
RootPane.defaultButtonWindowKeyBindings
RootPaneUI
ScrollBar.ancestorInputMap
ScrollBar.ancestorInputMap.RightToLeft
ScrollBar.background
ScrollBar.focusInputMap
ScrollBar.focusInputMap.RightToLeft
ScrollBar.foreground
ScrollBar.maximumThumbSize
ScrollBar.minimumThumbSize
ScrollBar.thumb
ScrollBar.thumbDarkShadow
ScrollBar.thumbHighlight
ScrollBar.thumbShadow
ScrollBar.track
ScrollBar.trackHighlight
ScrollBar.width
ScrollBarUI
ScrollPane.ancestorInputMap
ScrollPane.ancestorInputMap.RightToLeft
ScrollPane.background
ScrollPane.border
ScrollPane.font
ScrollPane.foreground
ScrollPaneUI
Separator.foreground
Separator.highlight
Separator.shadow
SeparatorUI
Slider.background
Slider.focus
Slider.focusInputMap
Slider.focusInputMap.RightToLeft
Slider.focusInsets
Slider.font
Slider.foreground
Slider.highlight
Slider.horizontalSize
Slider.minimumHorizontalSize
Slider.minimumVerticalSize
Slider.shadow
Slider.tickColor
Slider.verticalSize
SliderUI
Spinner.ancestorInputMap
Spinner.arrowButtonSize
Spinner.background
Spinner.editorAlignment
Spinner.editorBorderPainted
Spinner.font
Spinner.foreground
SpinnerUI
SplitPane.ancestorInputMap
SplitPane.background
SplitPane.border
SplitPane.darkShadow
SplitPane.dividerSize
SplitPane.highlight
SplitPane.leftButtonText
SplitPane.rightButtonText
SplitPane.shadow
SplitPaneDivider.draggingColor
SplitPaneDivider.horizontalGradientVariant
SplitPaneUI
TabbedPane.ancestorInputMap
TabbedPane.background
TabbedPane.contentBorderInsets
TabbedPane.contentOpaque
TabbedPane.darkShadow
TabbedPane.focus
TabbedPane.focusInputMap
TabbedPane.font
TabbedPane.foreground
TabbedPane.highlight
TabbedPane.leftTabInsets
TabbedPane.light
TabbedPane.opaque
TabbedPane.rightTabInsets
TabbedPane.selectedTabPadInsets
TabbedPane.shadow
TabbedPane.smallFont
TabbedPane.tabAreaInsets
TabbedPane.tabInsets
TabbedPane.tabRunOverlay
TabbedPane.tabsOpaque
TabbedPane.tabsOverlapBorder
TabbedPane.textIconGap
TabbedPane.useSmallLayout
TabbedPaneUI
Table.ancestorInputMap
Table.ancestorInputMap.RightToLeft
Table.ascendingSortIcon
Table.background
Table.descendingSortIcon
Table.dropLineColor
Table.dropLineShortColor
Table.focusCellBackground
Table.focusCellForeground
Table.focusCellHighlightBorder
Table.font
Table.foreground
Table.gridColor
Table.scrollPaneBorder
Table.selectionBackground
Table.selectionForeground
Table.sortIconColor
TableHeader.ancestorInputMap
TableHeader.background
TableHeader.cellBorder
TableHeader.focusCellBackground
TableHeader.font
TableHeader.foreground
TableHeaderUI
TableUI
TextArea.background
TextArea.border
TextArea.caretBlinkRate
TextArea.caretForeground
TextArea.focusInputMap
TextArea.font
TextArea.foreground
TextArea.inactiveBackground
TextArea.inactiveForeground
TextArea.margin
TextArea.selectionBackground
TextArea.selectionForeground
TextAreaUI
TextComponent.selectionBackgroundInactive
TextField.background
TextField.border
TextField.caretBlinkRate
TextField.caretForeground
TextField.darkShadow
TextField.focusInputMap
TextField.font
TextField.foreground
TextField.highlight
TextField.inactiveBackground
TextField.inactiveForeground
TextField.light
TextField.margin
TextField.selectionBackground
TextField.selectionForeground
TextField.shadow
TextFieldUI
TextPane.background
TextPane.border
TextPane.caretBlinkRate
TextPane.caretForeground
TextPane.focusInputMap
TextPane.font
TextPane.foreground
TextPane.inactiveBackground
TextPane.inactiveForeground
TextPane.margin
TextPane.selectionBackground
TextPane.selectionForeground
TextPaneUI
TitledBorder.aquaVariant
TitledBorder.border
TitledBorder.font
TitledBorder.titleColor
ToggleButton.background
ToggleButton.border
ToggleButton.darkShadow
ToggleButton.disabledText
ToggleButton.focusInputMap
ToggleButton.font
ToggleButton.foreground
ToggleButton.highlight
ToggleButton.light
ToggleButton.margin
ToggleButton.shadow
ToggleButton.textIconGap
ToggleButton.textShiftOffset
ToggleButtonUI
ToolBar.ancestorInputMap
ToolBar.background
ToolBar.border
ToolBar.darkShadow
ToolBar.dockingBackground
ToolBar.dockingForeground
ToolBar.floatingBackground
ToolBar.floatingForeground
ToolBar.font
ToolBar.foreground
ToolBar.highlight
ToolBar.light
ToolBar.shadow
ToolBarButton.insets
ToolBarButton.margin
ToolBarSeparatorUI
ToolBarUI
ToolTip.background
ToolTip.border
ToolTip.font
ToolTip.foreground
ToolTipManager.enableToolTipMode
ToolTipUI
Tree.ancestorInputMap
Tree.background
Tree.changeSelectionWithFocus
Tree.closedIcon
Tree.collapsedIcon
Tree.drawsFocusBorderAroundIcon
Tree.dropLineColor
Tree.editorBorder
Tree.expandedIcon
Tree.focusInputMap
Tree.focusInputMap.RightToLeft
Tree.font
Tree.foreground
Tree.hash
Tree.leafIcon
Tree.leftChildIndent
Tree.line
Tree.lineTypeDashed
Tree.openIcon
Tree.paintLines
Tree.rightChildIndent
Tree.rightToLeftCollapsedIcon
Tree.rowHeight
Tree.scrollsOnExpand
Tree.selectionBackground
Tree.selectionBorderColor
Tree.selectionForeground
Tree.textBackground
Tree.textForeground
Tree.timeFactor
TreeUI
Viewport.background
Viewport.font
Viewport.foreground
ViewportUI
_SecurityDecisionIcon
activeCaption
activeCaptionBorder
activeCaptionText
control
controlDkShadow
controlHighlight
controlLtHighlight
controlShadow
controlText
desktop
html.missingImage
html.pendingImage
inactiveCaption
inactiveCaptionBorder
inactiveCaptionText
info
infoText
menu
menuText
scrollbar
text
textHighlight
textHighlightText
textInactiveText
textText
window
windowBorder
windowText

I found the official list of resource keys used in the Nimbus Look and feel:

http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html

And the official component properties:

http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html

And here is another exhausting list (not Nimbus related). This is the source.

AbstractButton.clickText
AbstractDocument.additionText
AbstractDocument.deletionText
AbstractDocument.redoText
AbstractDocument.styleChangeText
AbstractDocument.undoText
AbstractUndoableEdit.redoText
AbstractUndoableEdit.undoText
AuditoryCues.allAuditoryCues
AuditoryCues.cueList
AuditoryCues.noAuditoryCues
Button.background
Button.border
Button.darkShadow
Button.defaultButtonFollowsFocus
Button.disabledText
Button.focusInputMap
Button.font
Button.foreground
Button.highlight
Button.light
Button.margin
Button.opaque
Button.select
Button.shadow
Button.textIconGap
Button.textShiftOffset
ButtonUI
CheckBox.background
CheckBox.border
CheckBox.disabledText
CheckBox.focusInputMap
CheckBox.font
CheckBox.foreground
CheckBox.icon
CheckBox.margin
CheckBox.select
CheckBox.textIconGap
CheckBox.textShiftOffset
CheckBoxMenuItem.acceleratorDelimiter
CheckBoxMenuItem.acceleratorFont
CheckBoxMenuItem.acceleratorForeground
CheckBoxMenuItem.acceleratorSelectionForeground
CheckBoxMenuItem.arrowIcon
CheckBoxMenuItem.background
CheckBoxMenuItem.border
CheckBoxMenuItem.borderPainted
CheckBoxMenuItem.checkIcon
CheckBoxMenuItem.dashIcon
CheckBoxMenuItem.disabledBackground
CheckBoxMenuItem.disabledForeground
CheckBoxMenuItem.font
CheckBoxMenuItem.foreground
CheckBoxMenuItem.margin
CheckBoxMenuItem.selectionBackground
CheckBoxMenuItem.selectionForeground
CheckBoxMenuItemUI
CheckBoxUI
ColorChooser.background
ColorChooser.cancelText
ColorChooser.font
ColorChooser.foreground
ColorChooser.hsbBlueText
ColorChooser.hsbBrightnessText
ColorChooser.hsbDisplayedMnemonicIndex
ColorChooser.hsbGreenText
ColorChooser.hsbHueText
ColorChooser.hsbMnemonic
ColorChooser.hsbNameText
ColorChooser.hsbRedText
ColorChooser.hsbSaturationText
ColorChooser.okText
ColorChooser.previewText
ColorChooser.resetMnemonic
ColorChooser.resetText
ColorChooser.rgbBlueMnemonic
ColorChooser.rgbBlueText
ColorChooser.rgbDisplayedMnemonicIndex
ColorChooser.rgbGreenMnemonic
ColorChooser.rgbGreenText
ColorChooser.rgbMnemonic
ColorChooser.rgbNameText
ColorChooser.rgbRedMnemonic
ColorChooser.rgbRedText
ColorChooser.sampleText
ColorChooser.swatchesDefaultRecentColor
ColorChooser.swatchesDisplayedMnemonicIndex
ColorChooser.swatchesMnemonic
ColorChooser.swatchesNameText
ColorChooser.swatchesRecentSwatchSize
ColorChooser.swatchesRecentText
ColorChooser.swatchesSwatchSize
ColorChooserUI
ComboBox.ancestorInputMap
ComboBox.background
ComboBox.buttonBackground
ComboBox.buttonDarkShadow
ComboBox.buttonHighlight
ComboBox.buttonShadow
ComboBox.disabledBackground
ComboBox.disabledForeground
ComboBox.font
ComboBox.foreground
ComboBox.isEnterSelectablePopup
ComboBox.selectionBackground
ComboBox.selectionForeground
ComboBox.timeFactor
ComboBox.togglePopupText
ComboBoxUI
Desktop.ancestorInputMap
Desktop.background
Desktop.minOnScreenInsets
DesktopIcon.border
DesktopIconUI
DesktopPaneUI
EditorPane.background
EditorPane.border
EditorPane.caretBlinkRate
EditorPane.caretForeground
EditorPane.focusInputMap
EditorPane.font
EditorPane.foreground
EditorPane.inactiveBackground
EditorPane.inactiveForeground
EditorPane.margin
EditorPane.selectionBackground
EditorPane.selectionForeground
EditorPaneUI
FileChooser.acceptAllFileFilterText
FileChooser.ancestorInputMap
FileChooser.byDateText
FileChooser.byNameText
FileChooser.cancelButtonMnemonic
FileChooser.cancelButtonText
FileChooser.chooseButtonText
FileChooser.createButtonText
FileChooser.desktopName
FileChooser.detailsViewIcon
FileChooser.directoryDescriptionText
FileChooser.directoryOpenButtonMnemonic
FileChooser.directoryOpenButtonText
FileChooser.fileDescriptionText
FileChooser.fileNameLabelMnemonic
FileChooser.fileNameLabelText
FileChooser.fileSizeGigaBytes
FileChooser.fileSizeKiloBytes
FileChooser.fileSizeMegaBytes
FileChooser.filesOfTypeLabelMnemonic
FileChooser.filesOfTypeLabelText
FileChooser.helpButtonMnemonic
FileChooser.helpButtonText
FileChooser.homeFolderIcon
FileChooser.listViewIcon
FileChooser.lookInLabelMnemonic
FileChooser.mac.newFolder
FileChooser.mac.newFolder.subsequent
FileChooser.newFolderAccessibleName
FileChooser.newFolderButtonText
FileChooser.newFolderErrorSeparator
FileChooser.newFolderErrorText
FileChooser.newFolderExistsErrorText
FileChooser.newFolderIcon
FileChooser.newFolderPromptText
FileChooser.newFolderTitleText
FileChooser.openButtonMnemonic
FileChooser.openButtonText
FileChooser.openDialogTitleText
FileChooser.openTitleText
FileChooser.readOnly
FileChooser.saveButtonMnemonic
FileChooser.saveButtonText
FileChooser.saveDialogFileNameLabelText
FileChooser.saveDialogTitleText
FileChooser.saveTitleText
FileChooser.untitledFileName
FileChooser.untitledFolderName
FileChooser.upFolderIcon
FileChooser.updateButtonMnemonic
FileChooser.updateButtonText
FileChooser.useSystemExtensionHiding
FileChooser.usesSingleFilePane
FileChooserUI
FileView.computerIcon
FileView.directoryIcon
FileView.fileIcon
FileView.floppyDriveIcon
FileView.hardDriveIcon
Focus.color
FormView.browseFileButtonText
FormView.resetButtonText
FormView.submitButtonText
FormattedTextField.background
FormattedTextField.border
FormattedTextField.caretBlinkRate
FormattedTextField.caretForeground
FormattedTextField.focusInputMap
FormattedTextField.font
FormattedTextField.foreground
FormattedTextField.inactiveBackground
FormattedTextField.inactiveForeground
FormattedTextField.margin
FormattedTextField.selectionBackground
FormattedTextField.selectionForeground
FormattedTextFieldUI
IconButton.font
InsetBorder.aquaVariant
InternalFrame.activeTitleBackground
InternalFrame.activeTitleForeground
InternalFrame.background
InternalFrame.borderColor
InternalFrame.borderDarkShadow
InternalFrame.borderHighlight
InternalFrame.borderLight
InternalFrame.borderShadow
InternalFrame.closeButtonToolTip
InternalFrame.closeIcon
InternalFrame.iconButtonToolTip
InternalFrame.iconifyIcon
InternalFrame.inactiveTitleBackground
InternalFrame.inactiveTitleForeground
InternalFrame.maxButtonToolTip
InternalFrame.maximizeIcon
InternalFrame.minimizeIcon
InternalFrame.opaque
InternalFrame.optionDialogBackground
InternalFrame.optionDialogTitleFont
InternalFrame.paletteBackground
InternalFrame.paletteTitleFont
InternalFrame.restoreButtonToolTip
InternalFrame.titleFont
InternalFrame.windowBindings
InternalFrameTitlePane.closeButtonAccessibleName
InternalFrameTitlePane.closeButtonOpacity
InternalFrameTitlePane.closeButtonText
InternalFrameTitlePane.iconifyButtonAccessibleName
InternalFrameTitlePane.iconifyButtonOpacity
InternalFrameTitlePane.maximizeButtonAccessibleName
InternalFrameTitlePane.maximizeButtonOpacity
InternalFrameTitlePane.maximizeButtonText
InternalFrameTitlePane.minimizeButtonText
InternalFrameTitlePane.moveButtonText
InternalFrameTitlePane.restoreButtonText
InternalFrameTitlePane.sizeButtonText
InternalFrameUI
IsindexView.prompt
Label.background
Label.disabledForeground
Label.disabledShadow
Label.font
Label.foreground
Label.opaque
LabelUI
List.background
List.cellRenderer
List.dropLineColor
List.evenRowBackgroundPainter
List.focusCellHighlightBorder
List.focusInputMap
List.focusInputMap.RightToLeft
List.font
List.foreground
List.oddRowBackgroundPainter
List.selectionBackground
List.selectionForeground
List.sourceListBackgroundPainter
List.sourceListFocusedSelectionBackgroundPainter
List.sourceListSelectionBackgroundPainter
List.timeFactor
ListUI
Menu.acceleratorFont
Menu.acceleratorForeground
Menu.acceleratorSelectionForeground
Menu.arrowIcon
Menu.background
Menu.border
Menu.borderPainted
Menu.checkIcon
Menu.consumesTabs
Menu.crossMenuMnemonic
Menu.disabledBackground
Menu.disabledForeground
Menu.font
Menu.foreground
Menu.margin
Menu.menuPopupOffsetX
Menu.menuPopupOffsetY
Menu.selectionBackground
Menu.selectionForeground
Menu.shortcutKeys
Menu.submenuPopupOffsetX
Menu.submenuPopupOffsetY
MenuBar.background
MenuBar.backgroundPainter
MenuBar.border
MenuBar.disabledBackground
MenuBar.disabledForeground
MenuBar.font
MenuBar.foreground
MenuBar.highlight
MenuBar.margin
MenuBar.selectedBackgroundPainter
MenuBar.selectionBackground
MenuBar.selectionForeground
MenuBar.shadow
MenuBar.windowBindings
MenuBarUI
MenuItem.acceleratorDelimiter
MenuItem.acceleratorFont
MenuItem.acceleratorForeground
MenuItem.acceleratorSelectionForeground
MenuItem.arrowIcon
MenuItem.background
MenuItem.border
MenuItem.borderPainted
MenuItem.checkIcon
MenuItem.disabledBackground
MenuItem.disabledForeground
MenuItem.font
MenuItem.foreground
MenuItem.margin
MenuItem.selectedBackgroundPainter
MenuItem.selectionBackground
MenuItem.selectionForeground
MenuItemUI
MenuUI
OptionPane.background
OptionPane.border
OptionPane.buttonAreaBorder
OptionPane.buttonClickThreshhold
OptionPane.buttonFont
OptionPane.cancelButtonMnemonic
OptionPane.cancelButtonText
OptionPane.errorIcon
OptionPane.font
OptionPane.foreground
OptionPane.informationIcon
OptionPane.inputDialogTitle
OptionPane.messageAreaBorder
OptionPane.messageDialogTitle
OptionPane.messageFont
OptionPane.messageForeground
OptionPane.minimumSize
OptionPane.noButtonMnemonic
OptionPane.noButtonText
OptionPane.okButtonMnemonic
OptionPane.okButtonText
OptionPane.questionIcon
OptionPane.titleText
OptionPane.warningIcon
OptionPane.windowBindings
OptionPane.yesButtonMnemonic
OptionPane.yesButtonText
OptionPaneUI
Panel.background
Panel.font
Panel.foreground
Panel.opaque
PanelUI
PasswordField.background
PasswordField.border
PasswordField.caretBlinkRate
PasswordField.caretForeground
PasswordField.echoChar
PasswordField.focusInputMap
PasswordField.font
PasswordField.foreground
PasswordField.inactiveBackground
PasswordField.inactiveForeground
PasswordField.margin
PasswordField.selectionBackground
PasswordField.selectionForeground
PasswordFieldUI
PopupMenu.background
PopupMenu.border
PopupMenu.consumeEventOnClose
PopupMenu.font
PopupMenu.foreground
PopupMenu.selectedWindowInputMapBindings
PopupMenu.selectedWindowInputMapBindings.RightToLeft
PopupMenu.selectionBackground
PopupMenu.selectionForeground
PopupMenuSeparatorUI
PopupMenuUI
PrintingDialog.abortButtonDisplayedMnemonicIndex
PrintingDialog.abortButtonMnemonic
PrintingDialog.abortButtonText
PrintingDialog.abortButtonToolTipText
PrintingDialog.contentAbortingText
PrintingDialog.contentInitialText
PrintingDialog.contentProgressText
PrintingDialog.titleAbortingText
PrintingDialog.titleProgressText
ProgressBar.background
ProgressBar.border
ProgressBar.cellLength
ProgressBar.cellSpacing
ProgressBar.cycleTime
ProgressBar.font
ProgressBar.foreground
ProgressBar.horizontalSize
ProgressBar.repaintInterval
ProgressBar.selectionBackground
ProgressBar.selectionForeground
ProgressBar.verticalSize
ProgressBarUI
ProgressMonitor.progressText
RadioButton.background
RadioButton.border
RadioButton.darkShadow
RadioButton.disabledText
RadioButton.focusInputMap
RadioButton.font
RadioButton.foreground
RadioButton.highlight
RadioButton.icon
RadioButton.light
RadioButton.margin
RadioButton.select
RadioButton.shadow
RadioButton.textIconGap
RadioButton.textShiftOffset
RadioButtonMenuItem.acceleratorDelimiter
RadioButtonMenuItem.acceleratorFont
RadioButtonMenuItem.acceleratorForeground
RadioButtonMenuItem.acceleratorSelectionForeground
RadioButtonMenuItem.arrowIcon
RadioButtonMenuItem.background
RadioButtonMenuItem.border
RadioButtonMenuItem.borderPainted
RadioButtonMenuItem.checkIcon
RadioButtonMenuItem.dashIcon
RadioButtonMenuItem.disabledBackground
RadioButtonMenuItem.disabledForeground
RadioButtonMenuItem.font
RadioButtonMenuItem.foreground
RadioButtonMenuItem.margin
RadioButtonMenuItem.selectionBackground
RadioButtonMenuItem.selectionForeground
RadioButtonMenuItemUI
RadioButtonUI
RootPane.ancestorInputMap
RootPane.defaultButtonWindowKeyBindings
RootPaneUI
ScrollBar.ancestorInputMap
ScrollBar.ancestorInputMap.RightToLeft
ScrollBar.background
ScrollBar.focusInputMap
ScrollBar.focusInputMap.RightToLeft
ScrollBar.foreground
ScrollBar.maximumThumbSize
ScrollBar.minimumThumbSize
ScrollBar.thumb
ScrollBar.thumbDarkShadow
ScrollBar.thumbHighlight
ScrollBar.thumbShadow
ScrollBar.track
ScrollBar.trackHighlight
ScrollBar.width
ScrollBarUI
ScrollPane.ancestorInputMap
ScrollPane.ancestorInputMap.RightToLeft
ScrollPane.background
ScrollPane.border
ScrollPane.font
ScrollPane.foreground
ScrollPaneUI
Separator.foreground
Separator.highlight
Separator.shadow
SeparatorUI
Slider.background
Slider.focus
Slider.focusInputMap
Slider.focusInputMap.RightToLeft
Slider.focusInsets
Slider.font
Slider.foreground
Slider.highlight
Slider.horizontalSize
Slider.minimumHorizontalSize
Slider.minimumVerticalSize
Slider.shadow
Slider.tickColor
Slider.verticalSize
SliderUI
Spinner.ancestorInputMap
Spinner.arrowButtonSize
Spinner.background
Spinner.editorAlignment
Spinner.editorBorderPainted
Spinner.font
Spinner.foreground
SpinnerUI
SplitPane.ancestorInputMap
SplitPane.background
SplitPane.border
SplitPane.darkShadow
SplitPane.dividerSize
SplitPane.highlight
SplitPane.leftButtonText
SplitPane.rightButtonText
SplitPane.shadow
SplitPaneDivider.draggingColor
SplitPaneDivider.horizontalGradientVariant
SplitPaneUI
TabbedPane.ancestorInputMap
TabbedPane.background
TabbedPane.contentBorderInsets
TabbedPane.contentOpaque
TabbedPane.darkShadow
TabbedPane.focus
TabbedPane.focusInputMap
TabbedPane.font
TabbedPane.foreground
TabbedPane.highlight
TabbedPane.leftTabInsets
TabbedPane.light
TabbedPane.opaque
TabbedPane.rightTabInsets
TabbedPane.selectedTabPadInsets
TabbedPane.shadow
TabbedPane.smallFont
TabbedPane.tabAreaInsets
TabbedPane.tabInsets
TabbedPane.tabRunOverlay
TabbedPane.tabsOpaque
TabbedPane.tabsOverlapBorder
TabbedPane.textIconGap
TabbedPane.useSmallLayout
TabbedPaneUI
Table.ancestorInputMap
Table.ancestorInputMap.RightToLeft
Table.ascendingSortIcon
Table.background
Table.descendingSortIcon
Table.dropLineColor
Table.dropLineShortColor
Table.focusCellBackground
Table.focusCellForeground
Table.focusCellHighlightBorder
Table.font
Table.foreground
Table.gridColor
Table.scrollPaneBorder
Table.selectionBackground
Table.selectionForeground
Table.sortIconColor
TableHeader.ancestorInputMap
TableHeader.background
TableHeader.cellBorder
TableHeader.focusCellBackground
TableHeader.font
TableHeader.foreground
TableHeaderUI
TableUI
TextArea.background
TextArea.border
TextArea.caretBlinkRate
TextArea.caretForeground
TextArea.focusInputMap
TextArea.font
TextArea.foreground
TextArea.inactiveBackground
TextArea.inactiveForeground
TextArea.margin
TextArea.selectionBackground
TextArea.selectionForeground
TextAreaUI
TextComponent.selectionBackgroundInactive
TextField.background
TextField.border
TextField.caretBlinkRate
TextField.caretForeground
TextField.darkShadow
TextField.focusInputMap
TextField.font
TextField.foreground
TextField.highlight
TextField.inactiveBackground
TextField.inactiveForeground
TextField.light
TextField.margin
TextField.selectionBackground
TextField.selectionForeground
TextField.shadow
TextFieldUI
TextPane.background
TextPane.border
TextPane.caretBlinkRate
TextPane.caretForeground
TextPane.focusInputMap
TextPane.font
TextPane.foreground
TextPane.inactiveBackground
TextPane.inactiveForeground
TextPane.margin
TextPane.selectionBackground
TextPane.selectionForeground
TextPaneUI
TitledBorder.aquaVariant
TitledBorder.border
TitledBorder.font
TitledBorder.titleColor
ToggleButton.background
ToggleButton.border
ToggleButton.darkShadow
ToggleButton.disabledText
ToggleButton.focusInputMap
ToggleButton.font
ToggleButton.foreground
ToggleButton.highlight
ToggleButton.light
ToggleButton.margin
ToggleButton.shadow
ToggleButton.textIconGap
ToggleButton.textShiftOffset
ToggleButtonUI
ToolBar.ancestorInputMap
ToolBar.background
ToolBar.border
ToolBar.darkShadow
ToolBar.dockingBackground
ToolBar.dockingForeground
ToolBar.floatingBackground
ToolBar.floatingForeground
ToolBar.font
ToolBar.foreground
ToolBar.highlight
ToolBar.light
ToolBar.shadow
ToolBarButton.insets
ToolBarButton.margin
ToolBarSeparatorUI
ToolBarUI
ToolTip.background
ToolTip.border
ToolTip.font
ToolTip.foreground
ToolTipManager.enableToolTipMode
ToolTipUI
Tree.ancestorInputMap
Tree.background
Tree.changeSelectionWithFocus
Tree.closedIcon
Tree.collapsedIcon
Tree.drawsFocusBorderAroundIcon
Tree.dropLineColor
Tree.editorBorder
Tree.expandedIcon
Tree.focusInputMap
Tree.focusInputMap.RightToLeft
Tree.font
Tree.foreground
Tree.hash
Tree.leafIcon
Tree.leftChildIndent
Tree.line
Tree.lineTypeDashed
Tree.openIcon
Tree.paintLines
Tree.rightChildIndent
Tree.rightToLeftCollapsedIcon
Tree.rowHeight
Tree.scrollsOnExpand
Tree.selectionBackground
Tree.selectionBorderColor
Tree.selectionForeground
Tree.textBackground
Tree.textForeground
Tree.timeFactor
TreeUI
Viewport.background
Viewport.font
Viewport.foreground
ViewportUI
_SecurityDecisionIcon
activeCaption
activeCaptionBorder
activeCaptionText
control
controlDkShadow
controlHighlight
controlLtHighlight
controlShadow
controlText
desktop
html.missingImage
html.pendingImage
inactiveCaption
inactiveCaptionBorder
inactiveCaptionText
info
infoText
menu
menuText
scrollbar
text
textHighlight
textHighlightText
textInactiveText
textText
window
windowBorder
windowText
不离久伴 2024-08-23 06:21:50

无论如何,您可以找到一个更高级的版本,其中所有属性都显示在 GUI 中,每个组件都位于选项卡式窗格中的单独选项卡上。您还可以更改 LAF。查看 UIManager 默认值

For what it's worth, you can find a fancier version of this where all the properties are displayed in a GUI with each component on a separate tab in a tabbed pane. You can also change the LAF. Check out UIManager Defaults.

只有影子陪我不离不弃 2024-08-23 06:21:50

这取决于 Java 的实现。这是一个简单的代码,您可以运行它来查看所有可用属性及其当前值。

public static void main(String[] args) {
            UIDefaults defaults = UIManager.getDefaults();
            System.out.println(defaults.size()+ " properties defined !");
            String[ ] colName = {"Key", "Value"};
            String[ ][ ] rowData = new String[ defaults.size() ][ 2 ];
            int i = 0;
            for(Enumeration e = defaults.keys(); e.hasMoreElements(); i++){
                Object key = e.nextElement();
                rowData[ i ] [ 0 ] = key.toString();
                rowData[ i ] [ 1 ] = ""+defaults.get(key);
                System.out.println(rowData[i][0]+" ,, "+rowData[i][1]);
            }
            JFrame f = new JFrame("UIManager properties default values");
            JTable t = new JTable(rowData, colName);
            f.setContentPane(new JScrollPane(t));
            //f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setVisible(true);
        }

It depends on the Java implementation. Here is the simple code that you can run to see all available properties and their current values.

public static void main(String[] args) {
            UIDefaults defaults = UIManager.getDefaults();
            System.out.println(defaults.size()+ " properties defined !");
            String[ ] colName = {"Key", "Value"};
            String[ ][ ] rowData = new String[ defaults.size() ][ 2 ];
            int i = 0;
            for(Enumeration e = defaults.keys(); e.hasMoreElements(); i++){
                Object key = e.nextElement();
                rowData[ i ] [ 0 ] = key.toString();
                rowData[ i ] [ 1 ] = ""+defaults.get(key);
                System.out.println(rowData[i][0]+" ,, "+rowData[i][1]);
            }
            JFrame f = new JFrame("UIManager properties default values");
            JTable t = new JTable(rowData, colName);
            f.setContentPane(new JScrollPane(t));
            //f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setVisible(true);
        }
余罪 2024-08-23 06:21:50

之前发布的代码只是获取当前外观设置的属性,默认情况下是金属 l&f。

它列出了我的系统(带有 Java 1.6.0_17 的 WinXP)上总共 636 个定义的属性,在 Windows L&F 和 Motif L&F 上定义的属性较少。我在互联网上找到了另一个列表(http://www.java2s.com/ Tutorial/Java/0240__Swing/ListingUIDefaultProperties.htm),其中找到了 795 个。

所以我认为问题仍然存在:有哪些属性?显然,即使 Metal L&F 也没有全部设置(或者导致 795 的代码是错误的)。

我感到困惑的是,似乎不存在太阳的官方列表,这将是我真正在寻找的东西(如果我的问题正确的话,还有OP)。

The code posted before just gets the properties set by the current look&feel which is the metal l&f by default.

It lists a total of 636 defined properties on my system (WinXP with Java 1.6.0_17) with less defined on Windows L&F and Motif L&F. I found another list on the internet (http://www.java2s.com/Tutorial/Java/0240__Swing/ListingUIDefaultProperties.htm) where 795 are found.

So I think the question still remains: Which properties are there? Obviously, even the Metal L&F doesn't set them all (or the code resulting in 795 is wrong).

I am puzzled by the fact there doesn't seem to exist an official list by sun, which would be what I really am looking for (as well as the OP if I got the question right).

下壹個目標 2024-08-23 06:21:50

我遇到了类似的问题,很少有 UI 元素以小字体显示。我已使用下面的代码打印了所有键并更新了特定元素

for (Iterator i = UIManager.getLookAndFeelDefaults().keySet().iterator(); i.hasNext();) {
            String key = new String();
            Object tmpKey = i.next();              
            if (tmpKey instanceof StringBuffer) {
                StringBuffer s = (StringBuffer) tmpKey;
                key = s.toString();                  
            } else {
                key = (String) tmpKey;
            }
            //Print all the keys available in UI manager
            System.out.println("Key:  " + key);
            if (key.endsWith("TabbedPane.font")) {                
                Font font = UIManager.getFont(key);
                Font biggerFont = font.deriveFont(2* font.getSize2D());
                // change ui default to bigger font
                UIManager.put(key, biggerFont);
            }else if(key.endsWith("Tree.rowHeight")){
                int rowHeight = UIManager.getInt(key);
                int bigRowHeight = 2*rowHeight;
                UIManager.put(key, bigRowHeight);
            }
        }

I had a similar issue where few UI elements were displaying in tiny fonts. I have printed all the keys using below code and updated the specific elements

for (Iterator i = UIManager.getLookAndFeelDefaults().keySet().iterator(); i.hasNext();) {
            String key = new String();
            Object tmpKey = i.next();              
            if (tmpKey instanceof StringBuffer) {
                StringBuffer s = (StringBuffer) tmpKey;
                key = s.toString();                  
            } else {
                key = (String) tmpKey;
            }
            //Print all the keys available in UI manager
            System.out.println("Key:  " + key);
            if (key.endsWith("TabbedPane.font")) {                
                Font font = UIManager.getFont(key);
                Font biggerFont = font.deriveFont(2* font.getSize2D());
                // change ui default to bigger font
                UIManager.put(key, biggerFont);
            }else if(key.endsWith("Tree.rowHeight")){
                int rowHeight = UIManager.getInt(key);
                int bigRowHeight = 2*rowHeight;
                UIManager.put(key, bigRowHeight);
            }
        }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文