class javax.swing.colorchooser.SwatchPanel extends javax.swing.JPanel
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: javax.swing.colorchooser.SwatchPanel
super_class: javax.swing.JPanel
{
protected java.awt.Color[] colors;
descriptor: [Ljava/awt/Color;
flags: (0x0004) ACC_PROTECTED
protected java.awt.Dimension swatchSize;
descriptor: Ljava/awt/Dimension;
flags: (0x0004) ACC_PROTECTED
protected java.awt.Dimension numSwatches;
descriptor: Ljava/awt/Dimension;
flags: (0x0004) ACC_PROTECTED
protected java.awt.Dimension gap;
descriptor: Ljava/awt/Dimension;
flags: (0x0004) ACC_PROTECTED
private int selRow;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int selCol;
descriptor: I
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial javax.swing.JPanel.<init>:()V
1: aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.initValues:()V
2: aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.initColors:()V
3: aload 0
ldc ""
invokevirtual javax.swing.colorchooser.SwatchPanel.setToolTipText:(Ljava/lang/String;)V
4: aload 0
iconst_1
invokevirtual javax.swing.colorchooser.SwatchPanel.setOpaque:(Z)V
5: aload 0
getstatic java.awt.Color.white:Ljava/awt/Color;
invokevirtual javax.swing.colorchooser.SwatchPanel.setBackground:(Ljava/awt/Color;)V
6: aload 0
iconst_1
invokevirtual javax.swing.colorchooser.SwatchPanel.setFocusable:(Z)V
7: aload 0
iconst_1
invokevirtual javax.swing.colorchooser.SwatchPanel.setInheritsPopupMenu:(Z)V
8: aload 0
new javax.swing.colorchooser.SwatchPanel$1
dup
aload 0
invokespecial javax.swing.colorchooser.SwatchPanel$1.<init>:(Ljavax/swing/colorchooser/SwatchPanel;)V
invokevirtual javax.swing.colorchooser.SwatchPanel.addFocusListener:(Ljava/awt/event/FocusListener;)V
9: aload 0
new javax.swing.colorchooser.SwatchPanel$2
dup
aload 0
invokespecial javax.swing.colorchooser.SwatchPanel$2.<init>:(Ljavax/swing/colorchooser/SwatchPanel;)V
invokevirtual javax.swing.colorchooser.SwatchPanel.addKeyListener:(Ljava/awt/event/KeyListener;)V
10: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Ljavax/swing/colorchooser/SwatchPanel;
public java.awt.Color getSelectedColor();
descriptor: ()Ljava/awt/Color;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield javax.swing.colorchooser.SwatchPanel.selCol:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.selRow:I
invokevirtual javax.swing.colorchooser.SwatchPanel.getColorForCell:(II)Ljava/awt/Color;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljavax/swing/colorchooser/SwatchPanel;
protected void initValues();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljavax/swing/colorchooser/SwatchPanel;
public void paintComponent(java.awt.Graphics);
descriptor: (Ljava/awt/Graphics;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=8, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.getBackground:()Ljava/awt/Color;
invokevirtual java.awt.Graphics.setColor:(Ljava/awt/Color;)V
1: aload 1
iconst_0
iconst_0
aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.getWidth:()I
aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.getHeight:()I
invokevirtual java.awt.Graphics.fillRect:(IIII)V
2: iconst_0
istore 2
start local 2 3: goto 35
4: StackMap locals: int
StackMap stack:
iload 2
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
imul
istore 3
start local 3 5: iconst_0
istore 4
start local 4 6: goto 33
7: StackMap locals: int int
StackMap stack:
aload 0
iload 4
iload 2
invokevirtual javax.swing.colorchooser.SwatchPanel.getColorForCell:(II)Ljava/awt/Color;
astore 5
start local 5 8: aload 1
aload 5
invokevirtual java.awt.Graphics.setColor:(Ljava/awt/Color;)V
9: aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.getComponentOrientation:()Ljava/awt/ComponentOrientation;
invokevirtual java.awt.ComponentOrientation.isLeftToRight:()Z
ifne 12
10: aload 0
getfield javax.swing.colorchooser.SwatchPanel.numSwatches:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iload 4
isub
iconst_1
isub
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
imul
istore 6
start local 6 11: goto 13
end local 6 12: StackMap locals: java.awt.Color
StackMap stack:
iload 4
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
imul
istore 6
start local 6 13: StackMap locals: int
StackMap stack:
aload 1
iload 6
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
invokevirtual java.awt.Graphics.fillRect:(IIII)V
14: aload 1
getstatic java.awt.Color.black:Ljava/awt/Color;
invokevirtual java.awt.Graphics.setColor:(Ljava/awt/Color;)V
15: aload 1
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
invokevirtual java.awt.Graphics.drawLine:(IIII)V
16: aload 1
iload 6
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
invokevirtual java.awt.Graphics.drawLine:(IIII)V
17: aload 0
getfield javax.swing.colorchooser.SwatchPanel.selRow:I
iload 2
if_icmpne 32
aload 0
getfield javax.swing.colorchooser.SwatchPanel.selCol:I
iload 4
if_icmpne 32
aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.isFocusOwner:()Z
ifeq 32
18: new java.awt.Color
dup
aload 5
invokevirtual java.awt.Color.getRed:()I
bipush 125
if_icmpge 19
sipush 255
goto 20
StackMap locals: javax.swing.colorchooser.SwatchPanel java.awt.Graphics int int int java.awt.Color int
StackMap stack: new 18 new 18
19: iconst_0
20: StackMap locals: javax.swing.colorchooser.SwatchPanel java.awt.Graphics int int int java.awt.Color int
StackMap stack: new 18 new 18 int
aload 5
invokevirtual java.awt.Color.getGreen:()I
bipush 125
if_icmpge 21
sipush 255
goto 22
StackMap locals: javax.swing.colorchooser.SwatchPanel java.awt.Graphics int int int java.awt.Color int
StackMap stack: new 18 new 18 int
21: iconst_0
22: StackMap locals: javax.swing.colorchooser.SwatchPanel java.awt.Graphics int int int java.awt.Color int
StackMap stack: new 18 new 18 int int
aload 5
invokevirtual java.awt.Color.getBlue:()I
bipush 125
if_icmpge 23
sipush 255
goto 24
StackMap locals: javax.swing.colorchooser.SwatchPanel java.awt.Graphics int int int java.awt.Color int
StackMap stack: new 18 new 18 int int
23: iconst_0
24: StackMap locals: javax.swing.colorchooser.SwatchPanel java.awt.Graphics int int int java.awt.Color int
StackMap stack: new 18 new 18 int int int
invokespecial java.awt.Color.<init>:(III)V
astore 7
start local 7 25: aload 1
aload 7
invokevirtual java.awt.Graphics.setColor:(Ljava/awt/Color;)V
26: aload 1
iload 6
iload 3
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
invokevirtual java.awt.Graphics.drawLine:(IIII)V
27: aload 1
iload 6
iload 3
iload 6
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
invokevirtual java.awt.Graphics.drawLine:(IIII)V
28: aload 1
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
invokevirtual java.awt.Graphics.drawLine:(IIII)V
29: aload 1
iload 6
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
invokevirtual java.awt.Graphics.drawLine:(IIII)V
30: aload 1
iload 6
iload 3
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
invokevirtual java.awt.Graphics.drawLine:(IIII)V
31: aload 1
iload 6
iload 3
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
iconst_1
isub
iload 6
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
iconst_1
isub
iload 3
invokevirtual java.awt.Graphics.drawLine:(IIII)V
end local 7 end local 6 end local 5 32: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
33: iload 4
aload 0
getfield javax.swing.colorchooser.SwatchPanel.numSwatches:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
if_icmplt 7
end local 4 end local 3 34: iinc 2 1
StackMap locals:
StackMap stack:
35: iload 2
aload 0
getfield javax.swing.colorchooser.SwatchPanel.numSwatches:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
if_icmplt 4
end local 2 36: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 37 0 this Ljavax/swing/colorchooser/SwatchPanel;
0 37 1 g Ljava/awt/Graphics;
3 36 2 row I
5 34 3 y I
6 34 4 column I
8 32 5 c Ljava/awt/Color;
11 12 6 x I
13 32 6 x I
25 32 7 c2 Ljava/awt/Color;
MethodParameters:
Name Flags
g
public java.awt.Dimension getPreferredSize();
descriptor: ()Ljava/awt/Dimension;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
getfield javax.swing.colorchooser.SwatchPanel.numSwatches:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
imul
iconst_1
isub
istore 1
start local 1 1: aload 0
getfield javax.swing.colorchooser.SwatchPanel.numSwatches:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
imul
iconst_1
isub
istore 2
start local 2 2: new java.awt.Dimension
dup
iload 1
iload 2
invokespecial java.awt.Dimension.<init>:(II)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljavax/swing/colorchooser/SwatchPanel;
1 3 1 x I
2 3 2 y I
protected void initColors();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljavax/swing/colorchooser/SwatchPanel;
public java.lang.String getToolTipText(java.awt.event.MouseEvent);
descriptor: (Ljava/awt/event/MouseEvent;)Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.awt.event.MouseEvent.getX:()I
aload 1
invokevirtual java.awt.event.MouseEvent.getY:()I
invokevirtual javax.swing.colorchooser.SwatchPanel.getColorForLocation:(II)Ljava/awt/Color;
astore 2
start local 2 1: new java.lang.StringBuilder
dup
aload 2
invokevirtual java.awt.Color.getRed:()I
invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ", "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.awt.Color.getGreen:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc ", "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.awt.Color.getBlue:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljavax/swing/colorchooser/SwatchPanel;
0 2 1 e Ljava/awt/event/MouseEvent;
1 2 2 color Ljava/awt/Color;
MethodParameters:
Name Flags
e
public void setSelectedColorFromLocation(int, int);
descriptor: (II)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.getComponentOrientation:()Ljava/awt/ComponentOrientation;
invokevirtual java.awt.ComponentOrientation.isLeftToRight:()Z
ifne 3
1: aload 0
aload 0
getfield javax.swing.colorchooser.SwatchPanel.numSwatches:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iload 1
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
idiv
isub
iconst_1
isub
putfield javax.swing.colorchooser.SwatchPanel.selCol:I
2: goto 4
3: StackMap locals:
StackMap stack:
aload 0
iload 1
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
idiv
putfield javax.swing.colorchooser.SwatchPanel.selCol:I
4: StackMap locals:
StackMap stack:
aload 0
iload 2
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
idiv
putfield javax.swing.colorchooser.SwatchPanel.selRow:I
5: aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.repaint:()V
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljavax/swing/colorchooser/SwatchPanel;
0 7 1 x I
0 7 2 y I
MethodParameters:
Name Flags
x
y
public java.awt.Color getColorForLocation(int, int);
descriptor: (II)Ljava/awt/Color;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual javax.swing.colorchooser.SwatchPanel.getComponentOrientation:()Ljava/awt/ComponentOrientation;
invokevirtual java.awt.ComponentOrientation.isLeftToRight:()Z
ifne 3
1: aload 0
getfield javax.swing.colorchooser.SwatchPanel.numSwatches:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iload 1
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
idiv
isub
iconst_1
isub
istore 3
start local 3 2: goto 4
end local 3 3: StackMap locals:
StackMap stack:
iload 1
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
iadd
idiv
istore 3
start local 3 4: StackMap locals: int
StackMap stack:
iload 2
aload 0
getfield javax.swing.colorchooser.SwatchPanel.swatchSize:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
aload 0
getfield javax.swing.colorchooser.SwatchPanel.gap:Ljava/awt/Dimension;
getfield java.awt.Dimension.height:I
iadd
idiv
istore 4
start local 4 5: aload 0
iload 3
iload 4
invokevirtual javax.swing.colorchooser.SwatchPanel.getColorForCell:(II)Ljava/awt/Color;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljavax/swing/colorchooser/SwatchPanel;
0 6 1 x I
0 6 2 y I
2 3 3 column I
4 6 3 column I
5 6 4 row I
MethodParameters:
Name Flags
x
y
private java.awt.Color getColorForCell(int, int);
descriptor: (II)Ljava/awt/Color;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield javax.swing.colorchooser.SwatchPanel.colors:[Ljava/awt/Color;
iload 2
aload 0
getfield javax.swing.colorchooser.SwatchPanel.numSwatches:Ljava/awt/Dimension;
getfield java.awt.Dimension.width:I
imul
iload 1
iadd
aaload
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljavax/swing/colorchooser/SwatchPanel;
0 1 1 column I
0 1 2 row I
MethodParameters:
Name Flags
column
row
}
SourceFile: "DefaultSwatchChooserPanel.java"
NestMembers:
javax.swing.colorchooser.SwatchPanel$1 javax.swing.colorchooser.SwatchPanel$2
InnerClasses:
javax.swing.colorchooser.SwatchPanel$1
javax.swing.colorchooser.SwatchPanel$2