/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Motif FileChooserUI.
*
* @author Jeff Dinkins
*/
private void populateFileNameLabel() {
} else {
}
}
return null;
} else {
} else {
}
}
}
if (i > 0) {
}
}
}
}
}
super(filechooser);
}
if(filenameTextField != null) {
return filenameTextField.getText();
} else {
return null;
}
}
if(filenameTextField != null) {
}
}
}
}
// PENDING(jeff)
}
}
return new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent e) {
if(f != null) {
}
}
if (sm instanceof DefaultListSelectionModel) {
}
if (sm instanceof DefaultListSelectionModel) {
}
if(currentDirectory != null) {
try {
} catch (IOException ioe) {
}
if ((getFileChooser().getFileSelectionMode() == JFileChooser.DIRECTORIES_ONLY) && !getFileChooser().isMultiSelectionEnabled()) {
}
}
if (fileNameLabel != null) {
}
if(getFileChooser().isMultiSelectionEnabled()) {
} else {
}
if(getAccessoryPanel() != null) {
if(e.getOldValue() != null) {
}
} else {
}
}
if (o != (ComponentOrientation)e.getOldValue()) {
}
}
}
};
}
//
// ComponentUI Interface Implementation methods
//
return new MotifFileChooserUI((JFileChooser)c);
}
super.installUI(c);
}
super.uninstallUI(c);
}
return insets;
}
};
interior.setInheritsPopupMenu(true);
// PENDING(jeff) - I18N
align(l);
if(currentDirectory != null) {
}
public Dimension getMaximumSize() {
Dimension d = super.getMaximumSize();
return d;
}
};
pathField.setInheritsPopupMenu(true);
l.setLabelFor(pathField);
// Change to folder on return
// CENTER: left, right accessory
// left panel - Filter & folderList
// add the filter PENDING(jeff) - I18N
l = new JLabel(filterLabelText);
align(l);
filterComboBox = new JComboBox() {
public Dimension getMaximumSize() {
Dimension d = super.getMaximumSize();
return d;
}
};
// leftPanel.add(Box.createRigidArea(vstrut10));
// Add the Folder List PENDING(jeff) - I18N
l = new JLabel(foldersLabelText);
align(l);
sp.setInheritsPopupMenu(true);
leftPanel.setInheritsPopupMenu(true);
// create files list
rightPanel.setInheritsPopupMenu(true);
l = new JLabel(filesLabelText);
align(l);
rightPanel.add(l);
sp = createFilesList();
sp.setInheritsPopupMenu(true);
centerPanel.setInheritsPopupMenu(true);
if(accessoryPanel != null) {
} else {
}
}
// add the filename field PENDING(jeff) - I18N
fileNameLabel = new JLabel();
filenameTextField = new JTextField() {
public Dimension getMaximumSize() {
Dimension d = super.getMaximumSize();
return d;
}
};
// Add buttons
public Dimension getMaximumSize() {
}
};
public Dimension getMaximumSize() {
}
};
updateButton.setInheritsPopupMenu(true);
public Dimension getMaximumSize() {
}
};
cancelButton.setInheritsPopupMenu(true);
public Dimension getMaximumSize() {
}
};
helpButton.setEnabled(false);
helpButton.setInheritsPopupMenu(true);
buttonPanel.setInheritsPopupMenu(true);
bottomPanel.setInheritsPopupMenu(true);
if (fc.getControlButtonsAreShown()) {
}
}
if (bottomPanel == null) {
}
return bottomPanel;
}
if (getFileChooser().getControlButtonsAreShown()) {
} else {
}
}
bottomPanel = null;
if (filterComboBoxModel != null) {
}
}
super.installStrings(fc);
}
}
// Since motif doesn't have button icons, leave this empty
// which overrides the supertype icon loading
}
// Since motif doesn't have button icons, leave this empty
// which overrides the supertype icon loading
}
if(getFileChooser().isMultiSelectionEnabled()) {
} else {
}
public void mouseClicked(MouseEvent e) {
if (index >= 0) {
}
}
}
});
fileList.setInheritsPopupMenu(true);
scrollpane.setInheritsPopupMenu(true);
return scrollpane;
}
directoryList = new JList();
scrollpane.setInheritsPopupMenu(true);
return scrollpane;
}
if (d != null) {
} else {
return prefSize;
}
}
return MIN_SIZE;
}
}
}
boolean isSelected, boolean cellHasFocus) {
setInheritsPopupMenu(true);
return this;
}
}
boolean isSelected, boolean cellHasFocus) {
setInheritsPopupMenu(true);
return this;
}
}
public MotifDirectoryListModel() {
getModel().addListDataListener(this);
}
public int getSize() {
}
}
}
}
// PENDING(jeff) - this is inefficient - should sent out
// incremental adjustment values instead of saying that the
// whole list has changed.
public void fireContentsChanged() {
}
// PENDING(jeff) - fire the correct interval changed - currently sending
// out that everything has changed
}
}
public MotifFileListModel() {
getModel().addListDataListener(this);
}
public int getSize() {
}
}
}
}
}
}
// PENDING(jeff) - this is inefficient - should sent out
// incremental adjustment values instead of saying that the
// whole list has changed.
public void fireContentsChanged() {
}
// PENDING(jeff) - fire the interval changed
}
}
//
// DataModel for Types Comboxbox
//
return new FilterComboBoxModel();
}
//
// Renderer for Types ComboBox
//
return new FilterComboBoxRenderer();
}
/**
* Render different type sizes and styles.
*/
boolean cellHasFocus) {
}
return this;
}
}
/**
* Data model for a type-face selection combo-box.
*/
protected class FilterComboBoxModel extends AbstractListModel implements ComboBoxModel, PropertyChangeListener {
protected FilterComboBoxModel() {
super();
}
}
}
}
}
// Ensure that the current filter is in the list.
// NOTE: we shouldnt' have to do this, since JFileChooser adds
// the filter to the choosable filters list when the filter
// is set. Lets be paranoid just in case someone overrides
// setFileFilter in JFileChooser.
boolean found = false;
if(currentFilter != null) {
if (filter == currentFilter) {
found = true;
}
}
if (!found) {
}
}
return getFileChooser().getFileFilter();
}
public int getSize() {
} else {
return 0;
}
}
// This shouldn't happen. Try to recover gracefully.
return getFileChooser().getFileFilter();
}
} else {
return null;
}
}
}
return approveButton;
}
}