2016-05-12 21 views
1

Ich habe ein Java-Projekt, das eine JTable verwendet, aber das Design ist sehr einfach. Gibt es einen Weg oder ein Plugin, um das Grunddesign des Eclipse JTable zu aktualisieren? Oder gibt es keine Möglichkeit, seinen Stil oder sein Thema zu ändern?JTable Stil oder Themen für Java Swing

+0

Verwenden Sie Swing? – PeaceIsPearl

+0

Ja ich benutze Windows Builder im Moment, aber mag nicht wie Jtable angezeigt wird –

+0

Bitte benutzen Sie JFormDesigner um Ihre GUI zu sehen – PeaceIsPearl

Antwort

3

Das Erscheinungsbild eines JTable wird durch seinen UI-Delegaten gesteuert, normalerweise eine Unterklasse von TableUI. Die Delegiertenauswahl wird von dem ausgewählten Look & Feel gesteuert. Unter Verwendung der Table Tasten unten rufen Sie UIManager.put() auf, wie gezeigt here, um die gewünschten Eigenschaften zu ändern. Einige der relevanten Schlüssel für verschiedene allgemeine Look & Feel-Implementierungen sind unten gezeigt. Beachten Sie, dass eine bestimmte Look & Feel-Implementierung Ihre Änderung ignorieren kann.

*** 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: [email protected] 
TableHeader.focusCellBackground: javax.swing.plaf.ColorUIResource[r=200,g=221,b=242] 
Table.focusCellHighlightBorder: [email protected] 
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: [email protected] 
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: [email protected] 
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: [email protected] 
Table.selectionForeground: sun.swing.PrintColorUIResource[r=51,g=51,b=51] 
Table.ancestorInputMap.RightToLeft: [email protected] 
Table.focusCellBackground: javax.swing.plaf.ColorUIResource[r=255,g=255,b=255] 
Table.scrollPaneBorder: [email protected] 
Table.ascendingSortIcon: [email protected] 
Table.sortIconColor: javax.swing.plaf.ColorUIResource[r=184,g=207,b=229] 
TableHeader.cellBorder: [email protected] 
Table.dropLineShortColor: sun.swing.PrintColorUIResource[r=51,g=51,b=51] 
Table.ancestorInputMap: [email protected] 
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: [email protected]e 
TableHeader:"TableHeader.renderer".contentMargins: javax.swing.plaf.InsetsUIResource[top=2,left=5,bottom=4,right=5] 
Table.font: [email protected]1 
TableHeader.disabled: [email protected]0 
TableHeader.rightAlignSortArrow: true 
TableHeaderUI: javax.swing.plaf.synth.SynthLookAndFeel 
TableHeader:"TableHeader.renderer"[MouseOver].backgroundPainter: [email protected] 
Table.disabled: [email protected]c 
Table.ancestorInputMap.RightToLeft: [email protected] 
TableHeader:"TableHeader.renderer"[Pressed].backgroundPainter: [email protected] 
Table.descendingSortIcon: [email protected] 
TableHeader:"TableHeader.renderer"[Disabled+Sorted].backgroundPainter: [email protected] 
TableHeader:"TableHeader.renderer"[Enabled+Focused].backgroundPainter: [email protected] 
Table.showGrid: false 
Table.ascendingSortIcon: [email protected] 
Table.rendererUseTableColors: true 
Table.contentMargins: javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0] 
Table.ancestorInputMap: [email protected] 
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: [email protected] 
TableHeader.background: [email protected]6 
Table.scrollPaneCornerComponent: [email protected] 
TableHeader:"TableHeader.renderer"[Enabled+Focused+Sorted].backgroundPainter: [email protected] 
Table.disabledText: [email protected]9 
Table.focusCellHighlightBorder: [email protected] 
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: [email protected] 
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: [email protected] 
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: [email protected] 
Table.foreground: [email protected]2 
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: [email protected]1 
TableHeader.contentMargins: javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0] 
TableHeader[Enabled].ascendingSortIconPainter: [email protected] 
Table.cellNoFocusBorder: [email protected] 
TableHeader.font: [email protected]3 
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: [email protected] 

*** 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: [email protected] 
TableHeader.focusCellBackground: javax.swing.plaf.ColorUIResource[r=255,g=247,b=233] 
Table.focusCellHighlightBorder: [email protected] 
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: [email protected] 
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: [email protected] 
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: [email protected] 
Table.selectionForeground: javax.swing.plaf.ColorUIResource[r=255,g=247,b=233] 
Table.ancestorInputMap.RightToLeft: [email protected] 
Table.focusCellBackground: javax.swing.plaf.ColorUIResource[r=174,g=178,b=195] 
Table.ascendingSortIcon: [email protected] 
Table.sortIconColor: javax.swing.plaf.ColorUIResource[r=99,g=101,b=111] 
TableHeader.cellBorder: [email protected] 
Table.dropLineShortColor: javax.swing.plaf.ColorUIResource[r=178,g=77,b=122] 
Table.ancestorInputMap: [email protected] 
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: [email protected] 
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: [email protected] 
Table.focusCellHighlightBorder: javax.swing.plaf.BorderUIResource$L[email protected] 
Table.dropLineColor: javax.swing.plaf.ColorUIResource[r=142,g=142,b=142] 
Table.scrollPaneBorder: [email protected] 
Table.descendingSortIcon: [email protected] 
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: [email protected] 
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: [email protected] 
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: [email protected] 
TableHeader.background: javax.swing.plaf.ColorUIResource[r=255,g=255,b=255] 
Table.ascendingSortIcon: [email protected] 
TableHeader.ancestorInputMap: [email protected] 
Table.sortIconColor: javax.swing.plaf.ColorUIResource[r=142,g=142,b=142]