2016-05-12 13 views
1

私はJTableを使用するJavaプロジェクトを持っていますが、デザインは非常に基本的です。 Eclipse JTableの基本的なデザインを更新する方法やプラグインはありますか?それとも、そのスタイルやテーマを変える方法はありませんか?JavaスイングのJTableスタイルまたはテーマ

+0

あなたはスイングを使用していますか? – PeaceIsPearl

+0

はい現在、Windowsのビルダーを使用していますが、Jtableの表示方法はありません –

+0

JFormDesignerを使用してGUIを表示してください – PeaceIsPearl

答えて

3

JTableの外観は、そのUIデリゲート、通常TableUIのサブクラスによって制御されます。デリゲートの選択は、選択されたLook & Feelによって制御されます。以下のTableキーを使用して、hereのようにUIManager.put()を呼び出し、目的のプロパティを変更します。いくつかの一般的なルック&フィールの実装に関する関連するキーを以下に示します。特定のLook & Feelの実装では、変更を無視することがあります。

*** 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: javax.swing.plaf.nimbus.[email protected] 
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: sun.swing.SwingLaz[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: [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] 
関連する問題