本文整理汇总了Java中com.vlsolutions.swing.tabbedpane.JTabbedPaneSmartIcon类的典型用法代码示例。如果您正苦于以下问题:Java JTabbedPaneSmartIcon类的具体用法?Java JTabbedPaneSmartIcon怎么用?Java JTabbedPaneSmartIcon使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JTabbedPaneSmartIcon类属于com.vlsolutions.swing.tabbedpane包,在下文中一共展示了JTabbedPaneSmartIcon类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resetTabIcons
import com.vlsolutions.swing.tabbedpane.JTabbedPaneSmartIcon; //导入依赖的package包/类
@Override
public void resetTabIcons() {
// configure attach button
attachAction = new AbstractAction("Attach") {
private static final long serialVersionUID = 390635147992456838L;
@Override
public void actionPerformed(ActionEvent e) {
desktop.setFloating(getDockable(), false);
}
};
attachSmartIcon = new SmartIconJButton(attachAction);
attachAction.putValue(Action.SHORT_DESCRIPTION, UIManager.get("DockViewTitleBar.attachButtonText"));
attachSmartIcon.setIcon(UIManager.getIcon("DockViewTitleBar.attach"));
attachSmartIcon.setPressedIcon(UIManager.getIcon("DockViewTitleBar.attach.pressed"));
attachSmartIcon.setRolloverIcon(UIManager.getIcon("DockViewTitleBar.attach.rollover"));
ArrayList<SmartIconJButton> icons = new ArrayList<SmartIconJButton>();
DockKey dockKey = getDockable().getDockKey();
if (dockKey.isCloseEnabled()) {
icons.add(closeSmartIcon);
}
if (dockKey.isFloatEnabled()) {
icons.add(attachSmartIcon);
}
if (icons.size() > 0) {
SmartIconJButton[] iconsArray = icons.toArray(new SmartIconJButton[0]);
smartIcon = new JTabbedPaneSmartIcon(dockKey.getIcon(), dockKey.getName(), null, null, true, iconsArray);
smartIcon.setIconForTabbedPane(tabHeader);
tabHeader.addTab("", smartIcon, getDockable().getComponent());
} else {
tabHeader.addTab(dockKey.getName(), dockKey.getIcon(), getDockable().getComponent());
}
}
示例2: resetTabIcons
import com.vlsolutions.swing.tabbedpane.JTabbedPaneSmartIcon; //导入依赖的package包/类
@Override
public void resetTabIcons() {
// configure attach button
attachAction = new LoggedAbstractAction("Attach") {
private static final long serialVersionUID = 390635147992456838L;
@Override
public void loggedActionPerformed(ActionEvent e) {
desktop.setFloating(getDockable(), false);
}
};
attachSmartIcon = new SmartIconJButton(attachAction);
attachAction.putValue(Action.SHORT_DESCRIPTION, UIManager.get("DockViewTitleBar.attachButtonText"));
attachSmartIcon.setIcon(UIManager.getIcon("DockViewTitleBar.attach"));
attachSmartIcon.setPressedIcon(UIManager.getIcon("DockViewTitleBar.attach.pressed"));
attachSmartIcon.setRolloverIcon(UIManager.getIcon("DockViewTitleBar.attach.rollover"));
ArrayList<SmartIconJButton> icons = new ArrayList<SmartIconJButton>();
DockKey dockKey = getDockable().getDockKey();
if (dockKey.isCloseEnabled()) {
icons.add(closeSmartIcon);
}
if (dockKey.isFloatEnabled()) {
icons.add(attachSmartIcon);
}
if (icons.size() > 0) {
SmartIconJButton[] iconsArray = icons.toArray(new SmartIconJButton[0]);
smartIcon = new JTabbedPaneSmartIcon(dockKey.getIcon(), dockKey.getName(), null, null, true, iconsArray);
smartIcon.setIconForTabbedPane(tabHeader);
tabHeader.addTab("", smartIcon, getDockable().getComponent());
} else {
tabHeader.addTab(dockKey.getName(), dockKey.getIcon(), getDockable().getComponent());
}
}
示例3: resetTabIcons
import com.vlsolutions.swing.tabbedpane.JTabbedPaneSmartIcon; //导入依赖的package包/类
@Override
public void resetTabIcons(){
// configure attach button
attachAction = new AbstractAction("Attach") {
private static final long serialVersionUID = 390635147992456838L;
public void actionPerformed(ActionEvent e){
desktop.setFloating(getDockable(), false);
}
};
attachSmartIcon = new SmartIconJButton(attachAction);
attachAction.putValue(AbstractAction.SHORT_DESCRIPTION, UIManager.get("DockViewTitleBar.attachButtonText"));
attachSmartIcon.setIcon(UIManager.getIcon("DockViewTitleBar.attach"));
attachSmartIcon.setPressedIcon(UIManager.getIcon("DockViewTitleBar.attach.pressed"));
attachSmartIcon.setRolloverIcon(UIManager.getIcon("DockViewTitleBar.attach.rollover"));
ArrayList<SmartIconJButton> icons = new ArrayList<SmartIconJButton>();
DockKey dockKey = getDockable().getDockKey();
if (dockKey.isCloseEnabled()){
icons.add(closeSmartIcon);
}
if (dockKey.isFloatEnabled()){
icons.add(attachSmartIcon);
}
if (icons.size()> 0){
SmartIconJButton [] iconsArray = (SmartIconJButton[]) icons.toArray(new SmartIconJButton[0]);
smartIcon = new JTabbedPaneSmartIcon(dockKey.getIcon(), dockKey.getName(), iconsArray);
smartIcon.setIconForTabbedPane(tabHeader);
tabHeader.addTab("", smartIcon, getDockable().getComponent());
} else {
tabHeader.addTab(dockKey.getName(), dockKey.getIcon(), getDockable().getComponent());
}
}