本文整理汇总了Java中com.l2fprod.common.swing.JDirectoryChooser类的典型用法代码示例。如果您正苦于以下问题:Java JDirectoryChooser类的具体用法?Java JDirectoryChooser怎么用?Java JDirectoryChooser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JDirectoryChooser类属于com.l2fprod.common.swing包,在下文中一共展示了JDirectoryChooser类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: JVMBundle
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
public JVMBundle()
{
setLayout(new PanelLayout());
add(m_checker);
add(m_selector);
m_selector.setFileChooser(new JDirectoryChooser());
m_checker.setAction(new AbstractAction(Main.local("JVMBUNDLE_CHECKBOX")) {
private static final long serialVersionUID = 1L;
public void actionPerformed(java.awt.event.ActionEvent e)
{
m_selector.setEnabled(m_checker.isSelected());
}
});
if (m_model != null)
dataChanged();
}
开发者ID:BisonSchweizAG,项目名称:JSmooth,代码行数:21,代码来源:JVMBundle.java
示例2: CurrentDirectory
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
public CurrentDirectory()
{
setLayout(new BorderLayout());
add(BorderLayout.CENTER, m_selector);
JPanel jpc = new JPanel();
jpc.setLayout(new BorderLayout());
jpc.add(BorderLayout.WEST, m_forceExePath);
jpc.add(BorderLayout.CENTER, new HelpButton(Main.local("CURRENTDIR_FORCEEXEPATH_HELP")));
add(BorderLayout.SOUTH, jpc);
m_forceExePath.setAction(new AbstractAction(Main.local("CURRENTDIR_FORCEEXEPATH")) {
private static final long serialVersionUID = 1L;
public void actionPerformed(java.awt.event.ActionEvent e)
{
if (m_forceExePath.isSelected())
m_selector.setEnabled(false);
else
m_selector.setEnabled(true);
}
});
m_selector.setFileChooser(new JDirectoryChooser());
}
开发者ID:BisonSchweizAG,项目名称:JSmooth,代码行数:26,代码来源:CurrentDirectory.java
示例3: showSetTargetFolderDialog
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
/**
*
*/
private void showSetTargetFolderDialog() {
JDirectoryChooser chooser = new JDirectoryChooser();
chooser.setShowingCreateDirectory(true);
File f = currentProfile.getTargetFolder();
if (f != null && f.exists())
chooser.setCurrentDirectory(f);
else {
f = currentProfile.getDatabaseFolder();
if (f != null && f.exists())
chooser.setCurrentDirectory(f);
}
int result = chooser.showOpenDialog(this);
if (result == JFileChooser.CANCEL_OPTION)
return;
f = chooser.getSelectedFile();
if (setTargetFolder(f.getAbsolutePath()))
txtTargetFolder.setText(f.getAbsolutePath());
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:22,代码来源:Mainframe.java
示例4: showSetDatabaseFolderDialog
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
/**
*
*/
private void showSetDatabaseFolderDialog() {
JDirectoryChooser chooser = new JDirectoryChooser();
chooser.setShowingCreateDirectory(false);
File f = currentProfile.getDatabaseFolder();
if (f != null && f.exists())
chooser.setCurrentDirectory(f);
int result = chooser.showOpenDialog(this);
if (result == JFileChooser.CANCEL_OPTION)
return;
f = chooser.getSelectedFile();
if (setDatabaseFolder(f.getAbsolutePath()))
txtDatabaseFolder.setText(f.getAbsolutePath());
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:17,代码来源:Mainframe.java
示例5: updateView
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
private void updateView(JFileChooser chooser) {
if (chooser.getApproveButtonText() != null) {
approveButton.setText(chooser.getApproveButtonText());
approveButton.setMnemonic(chooser.getApproveButtonMnemonic());
} else {
if (JFileChooser.OPEN_DIALOG == chooser.getDialogType()) {
approveButton.setText(openButtonText);
approveButton.setToolTipText(openButtonToolTipText);
approveButton.setMnemonic(openButtonMnemonic);
} else {
approveButton.setText(saveButtonText);
approveButton.setToolTipText(saveButtonToolTipText);
approveButton.setMnemonic(saveButtonMnemonic);
}
}
cancelButton.setText(cancelButtonText);
cancelButton.setMnemonic(cancelButtonMnemonic);
newFolderButton.setText(newFolderText);
newFolderButton.setToolTipText(newFolderToolTipText);
newFolderButton.setVisible(((JDirectoryChooser) chooser).isShowingCreateDirectory());
buttonPanel.setVisible(chooser.getControlButtonsAreShown());
// ensure approve/cancel buttons have the same width
approveButton.setPreferredSize(null);
cancelButton.setPreferredSize(null);
Dimension preferredSize = approveButton.getMinimumSize();
preferredSize = new Dimension(Math.max(preferredSize.width, cancelButton.getPreferredSize().width), preferredSize.height);
approveButton.setPreferredSize(preferredSize);
cancelButton.setPreferredSize(preferredSize);
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:35,代码来源:WindowsDirectoryChooserUI.java
示例6: propertyChange
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
public void propertyChange(PropertyChangeEvent evt) {
if (JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY.equals(evt.getPropertyName())) {
updateView(chooser);
}
if (JFileChooser.MULTI_SELECTION_ENABLED_CHANGED_PROPERTY.equals(evt.getPropertyName())) {
if (chooser.isMultiSelectionEnabled()) {
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
} else {
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
}
}
if (JFileChooser.DIRECTORY_CHANGED_PROPERTY.equals(evt.getPropertyName())) {
findFile(chooser.getCurrentDirectory(), false, false);
}
if (JFileChooser.ACCESSORY_CHANGED_PROPERTY.equals(evt.getPropertyName())) {
Component oldValue = (Component) evt.getOldValue();
Component newValue = (Component) evt.getNewValue();
if (oldValue != null) {
chooser.remove(oldValue);
}
if (newValue != null) {
chooser.add("North", newValue);
}
chooser.revalidate();
chooser.repaint();
}
if (JFileChooser.CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY.equals(evt.getPropertyName())) {
updateView(chooser);
}
if (JDirectoryChooser.SHOWING_CREATE_DIRECTORY_CHANGED_KEY.equals(evt.getPropertyName())) {
updateView(chooser);
}
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:39,代码来源:WindowsDirectoryChooserUI.java
示例7: WindowsDirectoryChooserUI
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
public WindowsDirectoryChooserUI(JDirectoryChooser chooser) {
super(chooser);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:4,代码来源:WindowsDirectoryChooserUI.java
示例8: installComponents
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
public void installComponents(JFileChooser chooser) {
this.chooser = (JDirectoryChooser)chooser;
chooser.setLayout(LookAndFeelTweaks.createBorderLayout());
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
Component accessory = chooser.getAccessory();
if (accessory != null) {
chooser.add("North", chooser.getAccessory());
}
tree = new JTree() {
public String getToolTipText(MouseEvent event) {
String tip = WindowsDirectoryChooserUI.this.getToolTipText(event);
if (tip == null) {
return super.getToolTipText(event);
} else {
return tip;
}
}
};
tree.addTreeExpansionListener(new TreeExpansion());
tree.setModel(new FileSystemTreeModel(chooser.getFileSystemView()));
tree.setRootVisible(false);
tree.setShowsRootHandles(false);
tree.setCellRenderer(new FileSystemTreeRenderer());
tree.setToolTipText("");
chooser.add("Center", treeScroll = new JScrollPane(tree));
treeScroll.setPreferredSize(new Dimension(300, 300));
approveButton = new JButton();
approveButton.setAction(getApproveSelectionAction());
cancelButton = new JButton();
cancelButton.addActionListener(getCancelSelectionAction());
buttonPanel = new JPanel(LookAndFeelTweaks.createButtonAreaLayout());
buttonPanel.add(approveButton);
buttonPanel.add(cancelButton);
chooser.add("South", buttonPanel);
updateView(chooser);
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:46,代码来源:WindowsDirectoryChooserUI.java
示例9: addBasicDefaults
import com.l2fprod.common.swing.JDirectoryChooser; //导入依赖的package包/类
protected void addBasicDefaults(LookAndFeelAddons addon, List defaults) {
defaults.addAll(
Arrays.asList(new Object[]{JDirectoryChooser.UI_CLASS_ID, "com.l2fprod.common.swing.plaf.windows.WindowsDirectoryChooserUI",}));
addResource(defaults, "com.l2fprod.common.swing.plaf.DirectoryChooserUIRB");
}
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:7,代码来源:JDirectoryChooserAddon.java
注:本文中的com.l2fprod.common.swing.JDirectoryChooser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论