下面列出了javax.swing.plaf.nimbus.AbstractRegionPainter#PaintContext ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* @param color The color to use as the basis for the painter
* @param state The state of the button to which this painter will apply
*/
public NamedButtonRegionPainter(Color color, int state) {
super(color, Themes.currentTheme.detailPanelBackground(), state);
Insets insets = new Insets(7, 7, 7, 7);
this.ctx = new AbstractRegionPainter.PaintContext(insets, new Dimension(10, 20), false);
}
/**
* @param color The color to use as the basis for the painter
* @param state The state of the button to which this painter will apply
*/
public NamedButtonRegionPainter(Color color, int state) {
super(color, Themes.currentTheme.detailPanelBackground(), state);
Insets insets = new Insets(7, 7, 7, 7);
this.ctx = new AbstractRegionPainter.PaintContext(insets, new Dimension(10, 20), false);
}
@Override
protected AbstractRegionPainter.PaintContext getPaintContext() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
protected final AbstractRegionPainter.PaintContext getPaintContext() {
return ctx;
}
/**
* @param color The color to use as the basis for the painter
* @param state The state of the button to which this painter will apply
*/
public NamedComboBoxPainter(Color color, int state) {
// super(color, Themes.currentTheme.buttonBackground(), state);
super(Color.RED, Color.BLUE, state);
Insets insets = new Insets(8, 9, 8, 19);
this.ctx = new AbstractRegionPainter.PaintContext(insets, new Dimension(83, 24), false);
}
/**
* @param color The color to use as the basis for the painter
* @param state The state of the button to which this painter will apply
*/
public NamedTabbedPaneTabAreaPainter(Color color, int state) {
super(color, Themes.currentTheme.detailPanelBackground(), state);
this.ctx = new AbstractRegionPainter.PaintContext(new Insets(0, 5, 6, 5), new Dimension(5, 24), false);
}
/**
* @param color The color to use as the basis for the painter
* @param state The state of the button to which this painter will apply
*/
public NamedComboBoxArrowButtonPainter(Color color, int state) {
// super(color, Themes.currentTheme.buttonBackground(), state);
super(Color.RED, Color.BLUE, state);
Insets insets = new Insets(8, 1, 8, 8);
this.ctx = new AbstractRegionPainter.PaintContext(insets, new Dimension(20, 24), false);
}
/**
* @param color The color to use as the basis for the painter
* @param state The state of the button to which this painter will apply
*/
public NamedComboBoxPainter(Color color, int state) {
// super(color, Themes.currentTheme.buttonBackground(), state);
super(Color.RED, Color.BLUE, state);
Insets insets = new Insets(8, 9, 8, 19);
this.ctx = new AbstractRegionPainter.PaintContext(insets, new Dimension(83, 24), false);
}
/**
* @param color The color to use as the basis for the painter
* @param state The state of the button to which this painter will apply
*/
public NamedTabbedPaneTabAreaPainter(Color color, int state) {
super(color, Themes.currentTheme.detailPanelBackground(), state);
this.ctx = new AbstractRegionPainter.PaintContext(new Insets(0, 5, 6, 5), new Dimension(5, 24), false);
}
/**
* @param color The color to use as the basis for the painter
* @param state The state of the button to which this painter will apply
*/
public NamedComboBoxArrowButtonPainter(Color color, int state) {
// super(color, Themes.currentTheme.buttonBackground(), state);
super(Color.RED, Color.BLUE, state);
Insets insets = new Insets(8, 1, 8, 8);
this.ctx = new AbstractRegionPainter.PaintContext(insets, new Dimension(20, 24), false);
}