简体   繁体   English

Java Swing 的 JTable 样式或主题

[英]JTable style or themes for Java Swing

I have a Java project that uses a JTable , but the design is very basic.我有一个使用JTable的 Java 项目,但设计非常基本。 Is there a way or a plugin to update the basic design of the Eclipse JTable ?有没有办法或插件来更新 Eclipse JTable的基本设计? Or is there no way to change its style or theme?或者有没有办法改变它的风格或主题?

The appearance of a JTable is controlled by its UI delegate, typically a subclass of TableUI . JTable的外观由其 UI 委托控制,通常是TableUI的子类。 The delegate selection is controlled by the chosen Look & Feel .委托选择由所选的外观控制。 Using the Table keys below, invoke UIManager.put() , as shown here , to change the desired properties.使用Table密钥下,调用UIManager.put()如图所示在这里,为了改变所期望的特性。 Several the relevant keys for several common Look & Feel implementations are shown below.下面显示了几个常见外观和感觉实现的几个相关键。 Note that a particular Look & Feel implementation may choose to ignore your change.请注意,特定的外观实现可能会选择忽略您的更改。

*** Metal javax.swing.plaf.metal.MetalLookAndFeel 641 entries
Table.dropCellBackground: javax.swing.plaf.ColorUIResource[r=210,g=233,b=255]
Table.background: javax.swing.plaf.ColorUIResource[r=255,g=255,b=255]
TableHeader.font: javax.swing.plaf.metal.MetalLookAndFeel$FontActiveValue@50040f0c
TableHeader.focusCellBackground: javax.swing.plaf.ColorUIResource[r=200,g=221,b=242]
Table.focusCellHighlightBorder: sun.swing.SwingLazyValue@2dda6444
TableHeader.foreground: sun.swing.PrintColorUIResource[r=51,g=51,b=51]
Table.dropLineColor: javax.swing.plaf.ColorUIResource[r=99,g=130,b=191]
Table.font: javax.swing.plaf.metal.MetalLookAndFeel$FontActiveValue@50040f0c
TableHeader.background: javax.swing.plaf.ColorUIResource[r=238,g=238,b=238]
TableHeaderUI: javax.swing.plaf.basic.BasicTableHeaderUI
TableUI: javax.swing.plaf.basic.BasicTableUI
TableHeader.ancestorInputMap: javax.swing.UIDefaults$LazyInputMap@5e9f23b4
Table.focusCellForeground: sun.swing.PrintColorUIResource[r=51,g=51,b=51]
Table.gridColor: javax.swing.plaf.ColorUIResource[r=122,g=138,b=153]
Table.descendingSortIcon: sun.swing.SwingUtilities2$2@4783da3f
Table.selectionForeground: sun.swing.PrintColorUIResource[r=51,g=51,b=51]
Table.ancestorInputMap.RightToLeft: javax.swing.UIDefaults$LazyInputMap@378fd1ac
Table.focusCellBackground: javax.swing.plaf.ColorUIResource[r=255,g=255,b=255]
Table.scrollPaneBorder: sun.swing.SwingLazyValue@49097b5d
Table.ascendingSortIcon: sun.swing.SwingUtilities2$2@6e2c634b
Table.sortIconColor: javax.swing.plaf.ColorUIResource[r=184,g=207,b=229]
TableHeader.cellBorder: sun.swing.SwingLazyValue@37a71e93
Table.dropLineShortColor: sun.swing.PrintColorUIResource[r=51,g=51,b=51]
Table.ancestorInputMap: javax.swing.UIDefaults$LazyInputMap@7e6cbb7a
Table.selectionBackground: javax.swing.plaf.ColorUIResource[r=184,g=207,b=229]
Table.foreground: sun.swing.PrintColorUIResource[r=51,g=51,b=51]

*** Nimbus javax.swing.plaf.nimbus.NimbusLookAndFeel 1058 entries
Table[Enabled+Selected].textForeground: DerivedColor(color=255,255,255 parent=nimbusLightBackground offsets=0.0,0.0,0.0,0 pColor=255,255,255
TableHeader.disabledText: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@506c589e
TableHeader:"TableHeader.renderer".contentMargins: javax.swing.plaf.InsetsUIResource[top=2,left=5,bottom=4,right=5]
Table.font: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@69d0a921
TableHeader.disabled: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@446cdf90
TableHeader.rightAlignSortArrow: true
TableHeaderUI: javax.swing.plaf.synth.SynthLookAndFeel
TableHeader:"TableHeader.renderer"[MouseOver].backgroundPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@799f7e29
Table.disabled: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@4b85612c
Table.ancestorInputMap.RightToLeft: javax.swing.UIDefaults$LazyInputMap@277050dc
TableHeader:"TableHeader.renderer"[Pressed].backgroundPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@5c29bfd
Table.descendingSortIcon: javax.swing.plaf.nimbus.NimbusIcon@7aec35a
TableHeader:"TableHeader.renderer"[Disabled+Sorted].backgroundPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@67424e82
TableHeader:"TableHeader.renderer"[Enabled+Focused].backgroundPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@42110406
Table.showGrid: false
Table.ascendingSortIcon: javax.swing.plaf.nimbus.NimbusIcon@531d72ca
Table.rendererUseTableColors: true
Table.contentMargins: javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0]
Table.ancestorInputMap: javax.swing.UIDefaults$LazyInputMap@22d8cfe0
Table[Disabled+Selected].textBackground: DerivedColor(color=57,105,138 parent=nimbusSelectionBackground offsets=0.0,0.0,0.0,0 pColor=57,105,138
TableHeader.opaque: true
TableHeader:"TableHeader.renderer"[Disabled].backgroundPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@579bb367
TableHeader.background: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@1de0aca6
Table.scrollPaneCornerComponent: javax.swing.plaf.nimbus.NimbusLookAndFeel$2@255316f2
TableHeader:"TableHeader.renderer"[Enabled+Focused+Sorted].backgroundPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@41906a77
Table.disabledText: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@4b9af9a9
Table.focusCellHighlightBorder: javax.swing.plaf.BorderUIResource@5387f9e0
TableHeader:"TableHeader.renderer".States: Enabled,MouseOver,Pressed,Disabled,Focused,Selected,Sorted
Table.dropLineShortColor: DerivedColor(color=191,98,4 parent=nimbusOrange offsets=0.0,0.0,0.0,0 pColor=191,98,4
Table.background: DerivedColor(color=255,255,255 parent=nimbusLightBackground offsets=0.0,0.0,0.0,0 pColor=255,255,255
TableHeader:"TableHeader.renderer"[Enabled+Sorted].backgroundPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@6e5e91e4
Table[Enabled+Selected].textBackground: DerivedColor(color=57,105,138 parent=nimbusSelectionBackground offsets=0.0,0.0,0.0,0 pColor=57,105,138
Table.rendererUseUIBorder: true
Table.textForeground: javax.swing.plaf.ColorUIResource[r=35,g=35,b=36]
Table.dropLineColor: DerivedColor(color=115,164,209 parent=nimbusFocus offsets=0.0,0.0,0.0,0 pColor=115,164,209
TableHeader.ancestorInputMap: javax.swing.UIDefaults$LazyInputMap@2cdf8d8a
Table.intercellSpacing: javax.swing.plaf.DimensionUIResource[width=0,height=0]
TableHeader:"TableHeader.renderer".Sorted: Sorted
Table:"Table.cellRenderer".opaque: true
TableHeader:"TableHeader.renderer"[Enabled].backgroundPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@30946e09
Table.foreground: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@5cb0d902
TableHeader:"TableHeader.renderer".opaque: true
TableUI: javax.swing.plaf.synth.SynthLookAndFeel
Table:"Table.cellRenderer".background: DerivedColor(color=255,255,255 parent=nimbusLightBackground offsets=0.0,0.0,0.0,0 pColor=255,255,255
TableHeader.foreground: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@46fbb2c1
TableHeader.contentMargins: javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0]
TableHeader[Enabled].ascendingSortIconPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@1698c449
Table.cellNoFocusBorder: javax.swing.plaf.BorderUIResource@5ef04b5
TableHeader.font: javax.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@5f4da5c3
Table:"Table.cellRenderer".contentMargins: javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0]
Table.opaque: true
Table.alternateRowColor: DerivedColor(color=242,242,242 parent=nimbusLightBackground offsets=0.0,0.0,-0.05098039,0 pColor=255,255,255
TableHeader[Enabled].descendingSortIconPainter: javax.swing.plaf.nimbus.NimbusDefaults$LazyPainter@443b7951

*** CDE/Motif com.sun.java.swing.plaf.motif.MotifLookAndFeel 553 entries
Table.background: javax.swing.plaf.ColorUIResource[r=174,g=178,b=195]
TableHeader.font: sun.swing.SwingLazyValue@69663380
TableHeader.focusCellBackground: javax.swing.plaf.ColorUIResource[r=255,g=247,b=233]
Table.focusCellHighlightBorder: javax.swing.plaf.BorderUIResource$LineBorderUIResource@5b37e0d2
TableHeader.foreground: javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
Table.dropLineColor: javax.swing.plaf.ColorUIResource[r=99,g=101,b=111]
Table.font: sun.swing.SwingLazyValue@69663380
TableHeader.background: javax.swing.plaf.ColorUIResource[r=174,g=178,b=195]
TableHeaderUI: javax.swing.plaf.basic.BasicTableHeaderUI
TableUI: javax.swing.plaf.basic.BasicTableUI
TableHeader.ancestorInputMap: javax.swing.UIDefaults$LazyInputMap@4459eb14
Table.focusCellForeground: javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
Table.gridColor: javax.swing.plaf.ColorUIResource[r=128,g=128,b=128]
Table.descendingSortIcon: sun.swing.SwingLazyValue@5a2e4553
Table.selectionForeground: javax.swing.plaf.ColorUIResource[r=255,g=247,b=233]
Table.ancestorInputMap.RightToLeft: javax.swing.UIDefaults$LazyInputMap@28c97a5
Table.focusCellBackground: javax.swing.plaf.ColorUIResource[r=174,g=178,b=195]
Table.ascendingSortIcon: sun.swing.SwingLazyValue@6659c656
Table.sortIconColor: javax.swing.plaf.ColorUIResource[r=99,g=101,b=111]
TableHeader.cellBorder: sun.swing.SwingLazyValue@6d5380c2
Table.dropLineShortColor: javax.swing.plaf.ColorUIResource[r=178,g=77,b=122]
Table.ancestorInputMap: javax.swing.UIDefaults$LazyInputMap@45ff54e6
Table.selectionBackground: javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
Table.foreground: javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]

*** Mac OS X com.apple.laf.AquaLookAndFeel 719 entries
Table.selectionInactiveBackground: com.apple.laf.AquaImageFactory$SystemColorProxy[r=202,g=202,b=202]
Table.focusCellForeground: com.apple.laf.AquaImageFactory$SystemColorProxy[r=164,g=205,b=255]
Table.ancestorInputMap: com.apple.laf.AquaKeyBindings$LateBoundInputMap@2328c243
Table.selectionBackground: com.apple.laf.AquaImageFactory$SystemColorProxy[r=9,g=80,b=208]
TableUI: com.apple.laf.AquaTableUI
Table.foreground: javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
Table.ancestorInputMap.RightToLeft: com.apple.laf.AquaKeyBindings$LateBoundInputMap@bebdb06
Table.focusCellHighlightBorder: javax.swing.plaf.BorderUIResource$LineBorderUIResource@7a4f0f29
Table.dropLineColor: javax.swing.plaf.ColorUIResource[r=142,g=142,b=142]
Table.scrollPaneBorder: sun.swing.SwingLazyValue@45283ce2
Table.descendingSortIcon: sun.swing.SwingLazyValue@2077d4de
TableHeader.focusCellBackground: javax.swing.plaf.ColorUIResource[r=255,g=255,b=255]
TableHeader.foreground: javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
TableHeader.font: sun.swing.SwingLazyValue@7591083d
Table.dropLineShortColor: javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
TableHeaderUI: com.apple.laf.AquaTableHeaderUI
Table.gridColor: javax.swing.plaf.ColorUIResource[r=255,g=255,b=255]
Table.focusCellBackground: com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0]
Table.selectionInactiveForeground: com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0]
Table.font: sun.swing.SwingLazyValue@77a567e1
Table.background: javax.swing.plaf.ColorUIResource[r=255,g=255,b=255]
Table.selectionForeground: com.apple.laf.AquaImageFactory$SystemColorProxy[r=255,g=255,b=255]
TableHeader.cellBorder: com.apple.laf.AquaTableHeaderBorder@736e9adb
TableHeader.background: javax.swing.plaf.ColorUIResource[r=255,g=255,b=255]
Table.ascendingSortIcon: sun.swing.SwingLazyValue@6d21714c
TableHeader.ancestorInputMap: javax.swing.UIDefaults$LazyInputMap@108c4c35
Table.sortIconColor: javax.swing.plaf.ColorUIResource[r=142,g=142,b=142]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM