本文整理匯總了Java中com.rapidminer.gui.tools.SwingTools.createImage方法的典型用法代碼示例。如果您正苦於以下問題:Java SwingTools.createImage方法的具體用法?Java SwingTools.createImage怎麽用?Java SwingTools.createImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.rapidminer.gui.tools.SwingTools
的用法示例。
在下文中一共展示了SwingTools.createImage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getIcon
import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
private Icon getIcon(String plotterName, boolean selected) {
// check to decide which icon size should be loaded
if (!isSmallIconsUsed()) {
if (selected) {
return SwingTools.createImage("icons/chartPreview/" + ICON_SIZE + "/" + plotterName.replace(' ', '_')
+ ".png");
} else {
return SwingTools.createImage("icons/chartPreview/" + ICON_SIZE + "/" + plotterName.replace(' ', '_')
+ "-grey.png");
}
} else {
if (selected) {
return SwingTools.createImage("icons/chartPreview/" + SMALL_ICON_SIZE + "/"
+ plotterName.replace(' ', '_') + ".png");
} else {
return SwingTools.createImage("icons/chartPreview/" + SMALL_ICON_SIZE + "/"
+ plotterName.replace(' ', '_') + "-grey.png");
}
}
}
示例2: createProgressPanel
import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
/**
* Creates a panel which displays the process animation and a stop button.
*
* @return the created panel
*/
private JPanel createProgressPanel() {
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 0.0;
gbc.weighty = 0.0;
gbc.insets = new Insets(0, 5, 5, 5);
ImageIcon animation = SwingTools
.createImage(I18N.getGUILabel("io.dataimport.step.store_data_to_repository.animation"));
animationLabel = new JLabel(animation);
animationLabel.setHorizontalTextPosition(JLabel.CENTER);
animationLabel.setVerticalTextPosition(JLabel.BOTTOM);
gbc.gridy += 1;
panel.add(animationLabel, gbc);
stopButton = new JButton(
new ResourceAction(true, "io.dataimport.step.store_data_to_repository.stop_data_import_progress") {
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
if (backgroundJob != null) {
setEnabled(false);
backgroundJob.cancel();
isImportCancelled = true;
}
}
});
gbc.insets = new Insets(40, 5, 5, 5);
gbc.gridy += 1;
panel.add(stopButton, gbc);
return panel;
}