本文整理汇总了Java中com.l2fprod.common.swing.JTaskPaneGroup类的典型用法代码示例。如果您正苦于以下问题:Java JTaskPaneGroup类的具体用法?Java JTaskPaneGroup怎么用?Java JTaskPaneGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JTaskPaneGroup类属于com.l2fprod.common.swing包,在下文中一共展示了JTaskPaneGroup类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addMacDefaults
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void addMacDefaults(LookAndFeelAddons addon, List defaults) {
super.addMacDefaults(addon, defaults);
defaults.addAll(Arrays.asList(new Object[]{
JTaskPaneGroup.UI_CLASS_ID,
"com.l2fprod.common.swing.plaf.misc.GlossyTaskPaneGroupUI",
"TaskPaneGroup.background",
new ColorUIResource(245, 245, 245),
"TaskPaneGroup.titleForeground",
new ColorUIResource(Color.black),
"TaskPaneGroup.specialTitleBackground",
new ColorUIResource(188,188,188),
"TaskPaneGroup.specialTitleForeground",
new ColorUIResource(Color.black),
"TaskPaneGroup.titleBackgroundGradientStart",
new ColorUIResource(250,250,250),
"TaskPaneGroup.titleBackgroundGradientEnd",
new ColorUIResource(188,188,188),
"TaskPaneGroup.borderColor",
new ColorUIResource(97, 97, 97),
"TaskPaneGroup.titleOver",
new ColorUIResource(125, 125, 97),
"TaskPaneGroup.specialTitleOver",
new ColorUIResource(125, 125, 97),
}));
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:26,代码来源:JTaskPaneGroupAddon.java
示例2: getPreferredSize
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
/**
* Calculates the preferred border size, its size so all its content fits.
*/
public Dimension getPreferredSize(JTaskPaneGroup group) {
// calculate the title width so it is fully visible
// it starts with the title width
configureLabel(group);
Dimension dim = label.getPreferredSize();
// add the title left offset
dim.width += 3;
// add the controls width
dim.width += TITLE_HEIGHT;
// and some space between label and controls
dim.width += 3;
dim.height = getTitleHeight();
return dim;
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:19,代码来源:BasicTaskPaneGroupUI.java
示例3: getPaintColor
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected Color getPaintColor(JTaskPaneGroup group) {
Color paintColor;
if (isMouseOverBorder()) {
if (mouseOver) {
if (group.isSpecial()) {
paintColor = specialTitleOver;
} else {
paintColor = titleOver;
}
} else {
if (group.isSpecial()) {
paintColor = specialTitleForeground;
} else {
paintColor = titleForeground;
}
}
} else {
if (group.isSpecial()) {
paintColor = specialTitleForeground;
} else {
paintColor = titleForeground;
}
}
return paintColor;
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:26,代码来源:BasicTaskPaneGroupUI.java
示例4: paintOvalAroundControls
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintOvalAroundControls(JTaskPaneGroup group, Graphics g, int x,
int y, int width, int height) {
if (group.isSpecial()) {
g.setColor(specialTitleBackground.brighter());
g.drawOval(
x,
y,
width,
height);
} else {
g.setColor(titleBackgroundGradientStart);
g.fillOval(
x,
y,
width,
height);
g.setColor(titleBackgroundGradientEnd.darker());
g.drawOval(
x,
y,
width,
width);
}
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:26,代码来源:BasicTaskPaneGroupUI.java
示例5: paintChevronControls
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintChevronControls(JTaskPaneGroup group, Graphics g, int x,
int y, int width, int height) {
ChevronIcon chevron;
if (group.isExpanded()) {
chevron = new ChevronIcon(true);
} else {
chevron = new ChevronIcon(false);
}
int chevronX = x + width / 2 - chevron.getIconWidth() / 2;
int chevronY = y + (height / 2 - chevron.getIconHeight());
chevron.paintIcon(group, g, chevronX, chevronY);
chevron.paintIcon(
group,
g,
chevronX,
chevronY + chevron.getIconHeight() + 1);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:18,代码来源:BasicTaskPaneGroupUI.java
示例6: paintTitleBackground
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintTitleBackground(JTaskPaneGroup group, Graphics g) {
if (group.isSpecial()) {
g.setColor(specialTitleBackground);
g.fillRoundRect(0, 0, group.getWidth(), ROUND_HEIGHT * 2, ROUND_HEIGHT, ROUND_HEIGHT);
g.fillRect(0, ROUND_HEIGHT, group.getWidth(), TITLE_HEIGHT - ROUND_HEIGHT);
} else {
Paint oldPaint = ((Graphics2D) g).getPaint();
GradientPaint gradient = new GradientPaint(0f, group.getWidth() / 2,
group.getComponentOrientation().isLeftToRight() ? titleBackgroundGradientStart : titleBackgroundGradientEnd, group.getWidth(),
TITLE_HEIGHT, group.getComponentOrientation().isLeftToRight() ? titleBackgroundGradientEnd : titleBackgroundGradientStart);
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
((Graphics2D) g).setPaint(gradient);
g.fillRoundRect(0, 0, group.getWidth(), ROUND_HEIGHT * 2, ROUND_HEIGHT, ROUND_HEIGHT);
g.fillRect(0, ROUND_HEIGHT, group.getWidth(), TITLE_HEIGHT - ROUND_HEIGHT);
((Graphics2D) g).setPaint(oldPaint);
}
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:21,代码来源:WindowsTaskPaneGroupUI.java
示例7: addMacDefaults
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void addMacDefaults(LookAndFeelAddons addon, List defaults) {
super.addMacDefaults(addon, defaults);
defaults.addAll(Arrays.asList(new Object[]{JTaskPaneGroup.UI_CLASS_ID,
"com.l2fprod.common.swing.plaf.misc.GlossyTaskPaneGroupUI",
"TaskPaneGroup.background",
new ColorUIResource(245, 245, 245),
"TaskPaneGroup.titleForeground",
new ColorUIResource(Color.black),
"TaskPaneGroup.specialTitleBackground",
new ColorUIResource(188, 188, 188),
"TaskPaneGroup.specialTitleForeground",
new ColorUIResource(Color.black),
"TaskPaneGroup.titleBackgroundGradientStart",
new ColorUIResource(250, 250, 250),
"TaskPaneGroup.titleBackgroundGradientEnd",
new ColorUIResource(188, 188, 188),
"TaskPaneGroup.borderColor",
new ColorUIResource(97, 97, 97),
"TaskPaneGroup.titleOver",
new ColorUIResource(125, 125, 97),
"TaskPaneGroup.specialTitleOver",
new ColorUIResource(125, 125, 97),}));
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:24,代码来源:JTaskPaneGroupAddon.java
示例8: propertyChange
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
public void propertyChange(PropertyChangeEvent evt) {
// if group is expanded but not animated
// or if animated has reached expanded state
// scroll to visible if scrollOnExpand is enabled
if ((JTaskPaneGroup.EXPANDED_CHANGED_KEY.equals(evt.getPropertyName()) && Boolean.TRUE.equals(evt.getNewValue()) &&
!group.isAnimated()) ||
(JCollapsiblePane.ANIMATION_STATE_KEY.equals(evt.getPropertyName()) && "expanded".equals(evt.getNewValue()))) {
if (group.isScrollOnExpand()) {
ensureVisible();
}
} else if (JTaskPaneGroup.ICON_CHANGED_KEY.equals(evt.getPropertyName()) ||
JTaskPaneGroup.TITLE_CHANGED_KEY.equals(evt.getPropertyName()) ||
JTaskPaneGroup.SPECIAL_CHANGED_KEY.equals(evt.getPropertyName()) ||
JTaskPaneGroup.COLLAPSABLE_CHANGED_KEY.equals(evt.getPropertyName())) {
// icon, title, special must lead to a repaint()
group.repaint();
}
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:19,代码来源:BasicTaskPaneGroupUI.java
示例9: getPreferredSize
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
/**
* Calculates the preferred border size, its size so all its content fits.
*/
public Dimension getPreferredSize(JTaskPaneGroup group) {
// calculate the title width so it is fully visible
// it starts with the title width
configureLabel(group);
Dimension dim = label.getPreferredSize();
// add the title left offset
dim.width += 3;
// add the controls width
dim.width += TITLE_HEIGHT;
// and some space between label and controls
dim.width += 3;
dim.height = getTitleHeight();
return dim;
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:19,代码来源:BasicTaskPaneGroupUI.java
示例10: paintRectAroundControls
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintRectAroundControls(JTaskPaneGroup group,
Graphics g,
int x,
int y,
int width,
int height,
Color highColor,
Color lowColor) {
if (mouseOver) {
int x2 = x + width;
int y2 = y + height;
g.setColor(highColor);
g.drawLine(x, y, x2, y);
g.drawLine(x, y, x, y2);
g.setColor(lowColor);
g.drawLine(x2, y, x2, y2);
g.drawLine(x, y2, x2, y2);
}
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:20,代码来源:BasicTaskPaneGroupUI.java
示例11: paintExpandedControls
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintExpandedControls(JTaskPaneGroup group, Graphics g, int x,
int y, int width, int height) {
((Graphics2D)g).setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g.setColor(getPaintColor(group));
paintRectAroundControls(group, g, x, y, width, height, g.getColor(), g
.getColor());
paintChevronControls(group, g, x, y, width, height);
((Graphics2D)g).setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:16,代码来源:MetalTaskPaneGroupUI.java
示例12: paintExpandedControls
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintExpandedControls(JTaskPaneGroup group, Graphics g, int x,
int y, int width, int height) {
((Graphics2D)g).setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
paintOvalAroundControls(group, g, x, y, width, height);
g.setColor(getPaintColor(group));
paintChevronControls(group, g, x, y, width, height);
((Graphics2D)g).setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:15,代码来源:GlossyTaskPaneGroupUI.java
示例13: paintExpandedControls
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintExpandedControls(JTaskPaneGroup group, Graphics g, int x,
int y, int width, int height) {
((Graphics2D)g).setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
paintOvalAroundControls(group, g, x, y, width, height);
g.setColor(getPaintColor(group));
paintChevronControls(group, g, x, y, width, height);
((Graphics2D)g).setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:15,代码来源:WindowsTaskPaneGroupUI.java
示例14: paintExpandedControls
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintExpandedControls(JTaskPaneGroup group, Graphics g, int x,
int y, int width, int height) {
((Graphics2D)g).setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
paintRectAroundControls(group, g, x, y, width, height, Color.white,
Color.gray);
g.setColor(getPaintColor(group));
paintChevronControls(group, g, x, y, width, height);
((Graphics2D)g).setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:16,代码来源:WindowsClassicTaskPaneGroupUI.java
示例15: addBasicDefaults
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void addBasicDefaults(LookAndFeelAddons addon, List defaults) {
Color menuBackground = new ColorUIResource(SystemColor.menu);
defaults.addAll(Arrays.asList(new Object[]{
JTaskPaneGroup.UI_CLASS_ID,
"com.l2fprod.common.swing.plaf.basic.BasicTaskPaneGroupUI",
"TaskPaneGroup.font",
new FontUIResource(
UIManager.getFont("Label.font").deriveFont(Font.BOLD)),
"TaskPaneGroup.background",
UIManager.getColor("List.background"),
"TaskPaneGroup.specialTitleBackground",
new ColorUIResource(menuBackground.darker()),
"TaskPaneGroup.titleBackgroundGradientStart",
menuBackground,
"TaskPaneGroup.titleBackgroundGradientEnd",
menuBackground,
"TaskPaneGroup.titleForeground",
new ColorUIResource(SystemColor.menuText),
"TaskPaneGroup.specialTitleForeground",
new ColorUIResource(SystemColor.menuText).brighter(),
"TaskPaneGroup.animate",
Boolean.TRUE,
"TaskPaneGroup.focusInputMap",
new UIDefaults.LazyInputMap(
new Object[] {
"ENTER",
"toggleExpanded",
"SPACE",
"toggleExpanded" }),
}));
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:32,代码来源:JTaskPaneGroupAddon.java
示例16: addMetalDefaults
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void addMetalDefaults(LookAndFeelAddons addon, List defaults) {
super.addMetalDefaults(addon, defaults);
// if using Ocean, use the Glossy l&f
String taskPaneGroupUI = "com.l2fprod.common.swing.plaf.metal.MetalTaskPaneGroupUI";
if (JVM.current().isOrLater(JVM.JDK1_5)) {
try {
Method method = MetalLookAndFeel.class.getMethod("getCurrentTheme");
Object currentTheme = method.invoke(null);
if (Class.forName("javax.swing.plaf.metal.OceanTheme").isInstance(
currentTheme)) {
taskPaneGroupUI = "com.l2fprod.common.swing.plaf.misc.GlossyTaskPaneGroupUI";
}
} catch (Exception e) {
}
}
defaults.addAll(Arrays.asList(new Object[]{
JTaskPaneGroup.UI_CLASS_ID,
taskPaneGroupUI,
"TaskPaneGroup.foreground",
UIManager.getColor("activeCaptionText"),
"TaskPaneGroup.background",
MetalLookAndFeel.getControl(),
"TaskPaneGroup.specialTitleBackground",
MetalLookAndFeel.getPrimaryControl(),
"TaskPaneGroup.titleBackgroundGradientStart",
MetalLookAndFeel.getPrimaryControl(),
"TaskPaneGroup.titleBackgroundGradientEnd",
MetalLookAndFeel.getPrimaryControlHighlight(),
"TaskPaneGroup.titleForeground",
MetalLookAndFeel.getControlTextColor(),
"TaskPaneGroup.specialTitleForeground",
MetalLookAndFeel.getControlTextColor(),
"TaskPaneGroup.borderColor",
MetalLookAndFeel.getPrimaryControl(),
"TaskPaneGroup.titleOver",
MetalLookAndFeel.getControl().darker(),
"TaskPaneGroup.specialTitleOver",
MetalLookAndFeel.getPrimaryControlHighlight()
}));
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:41,代码来源:JTaskPaneGroupAddon.java
示例17: installUI
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
public void installUI(JComponent c) {
super.installUI(c);
group = (JTaskPaneGroup)c;
installDefaults();
installListeners();
installKeyboardActions();
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:9,代码来源:BasicTaskPaneGroupUI.java
示例18: propertyChange
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
public void propertyChange(PropertyChangeEvent evt) {
// if group is expanded but not animated
// or if animated has reached expanded state
// scroll to visible if scrollOnExpand is enabled
if ((JTaskPaneGroup.EXPANDED_CHANGED_KEY.equals(evt.getPropertyName()) && Boolean.TRUE
.equals(evt.getNewValue()) && !group.isAnimated())
|| (JCollapsiblePane.ANIMATION_STATE_KEY.equals(evt.getPropertyName()) && "expanded"
.equals(evt.getNewValue()))) {
if (group.isScrollOnExpand()) {
ensureVisible();
}
}
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:14,代码来源:BasicTaskPaneGroupUI.java
示例19: paintTitleBackground
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintTitleBackground(JTaskPaneGroup group, Graphics g) {
if (group.isSpecial()) {
g.setColor(specialTitleBackground);
} else {
g.setColor(titleBackgroundGradientStart);
}
g.fillRect(0, 0, group.getWidth(), getTitleHeight() - 1);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:9,代码来源:BasicTaskPaneGroupUI.java
示例20: paintTitle
import com.l2fprod.common.swing.JTaskPaneGroup; //导入依赖的package包/类
protected void paintTitle(
JTaskPaneGroup group,
Graphics g,
Color textColor,
int x,
int y,
int width,
int height) {
configureLabel(group);
label.setForeground(textColor);
g.translate(x, y);
label.setBounds(0, 0, width, height);
label.paint(g);
g.translate(-x, -y);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:16,代码来源:BasicTaskPaneGroupUI.java
注:本文中的com.l2fprod.common.swing.JTaskPaneGroup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论