当前位置: 首页>>代码示例>>Java>>正文


Java DropShadowBorder类代码示例

本文整理汇总了Java中org.jdesktop.swingx.border.DropShadowBorder的典型用法代码示例。如果您正苦于以下问题:Java DropShadowBorder类的具体用法?Java DropShadowBorder怎么用?Java DropShadowBorder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DropShadowBorder类属于org.jdesktop.swingx.border包,在下文中一共展示了DropShadowBorder类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FancyButton

import org.jdesktop.swingx.border.DropShadowBorder; //导入依赖的package包/类
/**
 * Creates a button with initial text and an icon.
 *
 * @param text
 *            the text of the button
 * @param icon
 *            the Icon image to display on the button
 */
public FancyButton(String text, Icon icon) {
	super(text, icon);

	// setup fancy button things
	addMouseListener(hoverListener);
	addFocusListener(focusListener);

	setBorderPainted(false);
	setBorder(new DropShadowBorder(SHADOW_COLOR, 5, 0.5f, 12, false, false, true, true));
	setFocusPainted(false);
	setContentAreaFilled(false);
	setHorizontalAlignment(SwingConstants.LEFT);
	setHorizontalTextPosition(SwingConstants.RIGHT);

	setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

	setForeground(normalTextColor);
	drawArrow = true;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:28,代码来源:FancyButton.java

示例2: interactiveFancyButton

import org.jdesktop.swingx.border.DropShadowBorder; //导入依赖的package包/类
public void interactiveFancyButton() {
    JXButton button = new JXButton("Dummy .... but lonnnnnnngg");
    button.setBorder(BorderFactory.createCompoundBorder(new DropShadowBorder(), button.getBorder()));
    JXPanel panel = new JXPanel();
    panel.add(button);
    showInFrame(panel, "Fancy..");
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:8,代码来源:RendererIssues.java

示例3: createRendererComponent

import org.jdesktop.swingx.border.DropShadowBorder; //导入依赖的package包/类
@Override
protected AbstractButton createRendererComponent() {
    JXButton button = new JXButton();
    border = BorderFactory.createCompoundBorder(
            new DropShadowBorder(),
            button.getBorder());
    return button;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:9,代码来源:RendererIssues.java

示例4: ComponentPreviewPanel

import org.jdesktop.swingx.border.DropShadowBorder; //导入依赖的package包/类
private ComponentPreviewPanel(Orientation orientation) {
	this.orientation = orientation;
	setBorder(new DropShadowBorder(Color.GRAY, 2, 0.7f, 2, false, false, true, true));
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:5,代码来源:PrintPreviewPanel.java

示例5: FancyDropDownButton

import org.jdesktop.swingx.border.DropShadowBorder; //导入依赖的package包/类
public FancyDropDownButton(Action mainAction, Action arrowAction, boolean showText) {
	super(mainAction);
	if (!showText) {
		mainButton.setText(null);
	}
	mainButton.setOpaque(false);
	arrowButton.setOpaque(false);
	mainButton.setBorderPainted(false);
	mainButton.setMargin(new Insets(0, 0, 0, 0));
	mainButton.getModel().addChangeListener(changeListener);
	arrowButton.getModel().addChangeListener(changeListener);
	if (arrowAction != null) {
		arrowButton.addActionListener(arrowAction);
	} else {
		arrowButton.addActionListener(new DefaultArrowAction());
	}
	arrowButton.setMargin(new Insets(0, 0, 0, 0));
	mainButton.addPropertyChangeListener("enabled", new PropertyChangeListener() {

		@Override
		public void propertyChange(PropertyChangeEvent evt) {
			arrowButton.setEnabled(mainButton.isEnabled());
		}
	});

	arrowButtonPanel.setLayout(new CardLayout());
	arrowButtonPanel.setFloatable(false);
	arrowButtonPanel.setBorder(null);
	arrowButton.setBorderPainted(true);
	emptyPanel.setOpaque(false);
	arrowButtonPanel.setOpaque(false);

	// setup fancy button things
	addMouseListener(hoverListener);
	addArrowButtonMouseListener(hoverListener);
	addFocusListener(focusListener);

	setBorderPainted(false);
	setBorder(new DropShadowBorder(SHADOW_COLOR, 5, 0.5f, 12, false, false, true, true));
	arrowButton.setBorder(new DropShadowBorder(SHADOW_COLOR, 5, 0.5f, 12, false, false, true, true));
	setFocusPainted(false);
	setContentAreaFilled(false);
	setHorizontalAlignment(SwingConstants.LEFT);
	setHorizontalTextPosition(SwingConstants.RIGHT);

	setForeground(NORMAL_TEXTCOLOR);
	setFont(new Font("Open Sans Light", Font.PLAIN, 28));

	setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
	arrowButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:52,代码来源:FancyDropDownButton.java

示例6: FancyDropDownButton

import org.jdesktop.swingx.border.DropShadowBorder; //导入依赖的package包/类
public FancyDropDownButton(Action mainAction, Action arrowAction, boolean showText) {
	super(mainAction);
	if (!showText) {
		mainButton.setText(null);
	}
	mainButton.setOpaque(false);
	arrowButton.setOpaque(false);
	mainButton.setBorderPainted(false);
	mainButton.setMargin(new Insets(0, 0, 0, 0));
	mainButton.getModel().addChangeListener(changeListener);
	arrowButton.getModel().addChangeListener(changeListener);
	if (arrowAction != null) {
		arrowButton.addActionListener(arrowAction);
	} else {
		arrowButton.addActionListener(new DefaultArrowAction());
	}
	arrowButton.setMargin(new Insets(0, 0, 0, 0));
	mainButton.addPropertyChangeListener("enabled", new PropertyChangeListener() {

		@Override
		public void propertyChange(PropertyChangeEvent evt) {
			arrowButton.setEnabled(mainButton.isEnabled());
		}
	});

	arrowButtonPanel.setLayout(new CardLayout());
	arrowButtonPanel.setFloatable(false);
	arrowButtonPanel.setBorder(null);
	arrowButton.setBorderPainted(true);
	emptyPanel.setOpaque(false);
	arrowButtonPanel.setOpaque(false);

	// setup fancy button things
	addMouseListener(hoverListener);
	addArrowButtonMouseListener(hoverListener);
	addFocusListener(focusListener);

	setBorderPainted(false);
	setBorder(new DropShadowBorder(SHADOW_COLOR, 5, 0.5f, 12, false, false, true, true));
	arrowButton.setBorder(new DropShadowBorder(SHADOW_COLOR, 5, 0.5f, 12, false, false, true, true));
	setFocusPainted(false);
	setContentAreaFilled(false);
	setHorizontalAlignment(SwingConstants.LEFT);
	setHorizontalTextPosition(SwingConstants.RIGHT);

	setForeground(NORMAL_TEXTCOLOR);
	setFont(FontTools.getFont("Open Sans Light", Font.PLAIN, 28));

	setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
	arrowButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:52,代码来源:FancyDropDownButton.java


注:本文中的org.jdesktop.swingx.border.DropShadowBorder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。