Package util.ui

Examples of util.ui.ExtensionFileFilter


   *          programs that are exported
   */
  private File chooseFile(Program[] programs) {
    JFileChooser select = new JFileChooser();

    ExtensionFileFilter vCal = new ExtensionFileFilter(mExtension,
        mExtensionFilter);
    select.addChoosableFileFilter(vCal);
    String ext = "." + mExtension;

    if (mSavePath != null) {
View Full Code Here


    reminderWindowCfg.add(mShowAlwaysOnTop, cc.xy(2,3));
       
    mSoundFileChB = new FileCheckBox(mLocalizer.msg("playlingSound", "Play sound"), new File(soundFName), 0, false);
   
    JFileChooser soundChooser=new JFileChooser((String)null);
    soundChooser.setFileFilter(new ExtensionFileFilter(extArr, msg));

    mSoundFileChB.setFileChooser(soundChooser);
       
    mSoundFileChB.setSelected(mSettings.getProperty("usesound","false").equals("true"));
   
View Full Code Here

     */
    private void importDevice() {
      JFileChooser chooser = new JFileChooser();
      chooser.setDialogTitle(mLocalizer.msg("importDevice", "Import device"));
     
      ExtensionFileFilter filter = new ExtensionFileFilter("tcf", mLocalizer.msg("FileType", "TV-Browser Capture-Device File (*.tcf)"));

      chooser.addChoosableFileFilter(filter);
      if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
        DeviceImportAndExport importer = new DeviceImportAndExport();
       
View Full Code Here

     */
    private void exportDevice() {
      JFileChooser chooser = new JFileChooser();
      chooser.setDialogTitle(mLocalizer.msg("exportDevice", "Export device"));
     
      ExtensionFileFilter filter = new ExtensionFileFilter("tcf", mLocalizer.msg("FileType", "TV-Browser Capture-Device File (*.tcf)"));

      chooser.addChoosableFileFilter(filter);

      if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
       
View Full Code Here

    String msg = SimpleMarkerPlugin.getLocalizer().msg("iconFiles",
        "Icon Files ({0})", "*.png,*.jpg, *.gif");
    String[] extArr = { ".png", ".jpg", ".gif" };

    chooser.setFileFilter(new ExtensionFileFilter(extArr, msg));
    chooser.setDialogTitle(SimpleMarkerPlugin.getLocalizer().msg("chooseIcon",
        "Choose icon for '{0}'", markList.getName()));

    Window w = UiUtilities.getLastModalChildOf(SimpleMarkerPlugin
        .getInstance().getSuperFrame());
View Full Code Here

  /**
   * Opens a FileChooser and stores all User-Settings in a zip file
   */
  private void export() {
    JFileChooser fileChooser=new JFileChooser();
    ExtensionFileFilter filter = new ExtensionFileFilter(".zip","Zip (*.zip)");
    fileChooser.setFileFilter(filter);
    int retVal = fileChooser.showSaveDialog(this);

    if (retVal == JFileChooser.APPROVE_OPTION) {
      File f=fileChooser.getSelectedFile();
      if (f!=null) {
        if (f.getName().indexOf('.') == -1) {
          f = new File(f.getAbsolutePath() + filter.getExtension());
        }
        ZipUtil zip = new ZipUtil();

        StringBuilder dir = new StringBuilder(Settings.getUserSettingsDirName())
            .append(File.separatorChar).append("lang").append(
View Full Code Here

  protected void importFavorites() {
    JFileChooser fileChooser = new JFileChooser();
    String[] extArr = { ".txt" };
    String msg = mLocalizer.msg("importFile.TVgenial", "Text file (from TVgenial) (.txt)");
    fileChooser.setFileFilter(new ExtensionFileFilter(extArr, msg));
    if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {

      File file = fileChooser.getSelectedFile();
      if (file != null) {
        FileReader reader = null;
View Full Code Here

TOP

Related Classes of util.ui.ExtensionFileFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.