Checking a file filter

I've managed to create a file saver dialog, with some custom file filters, called JpegSave and PPM save.
I'm trying to check, once a file saver dialog has been created, to check what the current file filter is.
Is it possible to check, by writing some code, whether the current file saver dialog's file filter is a certain file filter?

Thanks, but that doesn't seem to work.
Wouldn't that code just create a new FileFilter and
set it to the current filter?
I'm trying to find out what the current filter is and
check if it is the same as a certain file filter
getFileFilter() returns to you the file filter that is currently in use by the JFileChooser. If you want to compare it with another file filter to see if it is the same, do:
if (filter == getFileFilter()) { .. }
Most likely, though, what you really would want to do is see if it's the same TYPE of file filter. So you'd want to do something like:
if (fileChooser.getFileFilter() instanceof filter.getClass()) { .. }

Similar Messages

  • Obiee upload file filter

    Hi,
    In Obiee 11g, i'am using the new functionnality of file uploading. However, i would kniw if it's possible to do add a file filter? I want only .doc files to uploaded.
    Thanks.

    OK,
    Using firebird, i found the right JS file. I didn't finished the filter yet because i have also to check that i am in the right folder but i think i am in the right way.
    Thanks.
    However, if a new patch is installed, there is a risk to have my customizations delete. There is way to prenvent this ?

  • Using Windows 7 and LR 5  when I look at the Keyword List a certain keyword has 7 pictures but when I check the Library Filter with that keyword 350 pictures are shown which includes the 7 pictures that have the keyword.  Why does the Library Filter showi

    Using Windows 7 and LR 5,  when I look at the Keyword List a certain keyword has 7 pictures but when I check the Library Filter with that keyword 350 pictures are shown which includes the 7 pictures that have the keyword.  Why does the Library Filter showing pictures that do not match the query

    Dan,
    Here's what's going on in the catalog you sent me, "Joel & Caitlin's Wedding".  There is the keyword "gwenn", which is explicitly assigned to 7 pics. But keyword "schwartz" has a number of synonyms, including "gwenn", and it is assigned to 25 pics.  There is no overlap between the two sets of pics. 
    I discovered these two occurrences by doing Metadata > Export Keywords, opening the exported file in an editor, and then searching for "gwenn".  I found two occurrences of "gwenn":
    gwenn
    schwartz
        {gwenn}
    From this, you can see that the keyword "schwartz" has 9 synonyms, of which "gwenn" is one.
    The filter criterion "Keywords Contain gwenn" will match the 7 pics that are explicitly assigned the keyword "gwenn", and it will also match the 25 pics assigned the keyword "schwartz", because that keyword has a synonym "gwenn".
    This illustrates the behavior I mentioned above: The criterion "Keywords contains x" will match against any of a pic's assigned keywords, any of those keywords' ancestor keywords, and any of the synonyms of the assigned keywords and their ancestors.
    So LR is operating correctly here, if not in a way that's easy to understand. 
    It appears that you are using the synonyms of "schwartz" to represent individual members of the Schwartz family.  A better way of representing family relationships is to have a parent keyword "Schwartz", with subkeywords for each family member, e.g. "Gwenn Schwartz", "Joe Schwartz", "Jane Schwartz", etc.  Repeating the family name in the subkeywords has a couple of advantages. LR usually only displays the "leaf" name of a keyword, so instead of showing you just "Joe", it will show you "Joe Schwartz", helpful when there are a number of different people whose first name is "Joe".  Also, if you ever export your pics to other software, it may not understand the LR hierarchy and won't show the parent keywords, so again it's more informative to see a keyword named "Joe Schwartz" rather than "Joe".

  • What's the function of "Manage checked out files" in library settings?

    hi there,
    can anyone tell the function of "Manage checked out files " in library settings? it seems the place to manage all the checked out files in that library. but i can't see any one there. thanks in advance.
    allan

    Hi,
    The checked out files page will only show files which have no checked in version. It is a way for a library administrator to clean up a document library. Imagine you created a new document that was only checked out to you and had no checked in version. It wouldn't show up in list views for anyone else. You have to go to that page to delete this document.
    If you want to see all the checked out files in your library, you can create a new view and filter the view by “check out to” column (“check out to” column “is greater than or equal to” give a value like character A)
    Hope it can help you.
    Xue-Mei Chang

  • How to check the file size before loading it to the context

    Hello,
    I have an application to upload a file and write it to the server using the FileUpload UI and IWDResource Interface.
    I would like to limit the size of the file the user is uploading to, say, 2MB.
    The problem is that the current API doesn't allow me to check the file size before I store it in IWDResource. The API available for IWDResource:
    IWDResource resource = ...
    InputStream stream = resource.read(false);
    size = stream.available();
    Is working on the file only AFTER storing it in the context and the server's memory. This way, if a user decides to upload 1GB file for example, he can easily crash the server.
    I am already familiar with <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71">this</a> arcticle but it doesn't answer this question as well, all it does is calculating the file size only after storing it in the context.
    Any ideas...?
    Roy

    Hi Ram,
    Have you activated your Objects ?
    You need to activate your objects in order to see them in RWB.
    Thanks & Regards,
    Varun Joshi

  • Problems checking in files to DMS

    Hi DMS gurus,
    I have some questions regarding the checking in files to SAP DMS. Any help would be very much appreciated.  
    1. Ideally, I need to check in a binary table with the file content directly to DMS.  Is it possible? I am trying to use CVAPI_DOC_CHECKIN with PF_CONTENT_PROVIDE = 'TBL', but it doesn't work because there is no path for the file name in PT_FILES_X since I do not have a file, just a binary table.
    2. How to automatically delete the file from the source after it's been checked in? The checkbox "Delete file after check-in" is marked in configuration for WS application, but the source file is not getting deleted.
    3. How to check in the file from Application server using BAPI_DOCUMENT_CHECKIN2? The HOSTNAME requires the network address, but how to configure it. In SPRO I found network addresses for Data carriers. Not sure if it's the place.
    Thank you

    Hi DMS gurus,
    I have some questions regarding the checking in files to SAP DMS. Any help would be very much appreciated.  
    1. Ideally, I need to check in a binary table with the file content directly to DMS.  Is it possible? I am trying to use CVAPI_DOC_CHECKIN with PF_CONTENT_PROVIDE = 'TBL', but it doesn't work because there is no path for the file name in PT_FILES_X since I do not have a file, just a binary table.
    2. How to automatically delete the file from the source after it's been checked in? The checkbox "Delete file after check-in" is marked in configuration for WS application, but the source file is not getting deleted.
    3. How to check in the file from Application server using BAPI_DOCUMENT_CHECKIN2? The HOSTNAME requires the network address, but how to configure it. In SPRO I found network addresses for Data carriers. Not sure if it's the place.
    Thank you

  • Problem Checking if File Exists When App is Launched

    I'm developing an app which checks a file "lastuser.txt" to determine which database to open, as sometimes people share phones. Anyway, I'm trying to call  TryGetItemAsync() in the OnLaunched() section in App.xaml.cs but I get the message
    "The name 'TryGetItemAsync' does not exist in the current context".  I am new to C# and phone app development. Any help would be greatly appreciated. Below is my code:
    tia
    CS
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using SQLite;
    using System.Runtime.InteropServices.WindowsRuntime;
    using Windows.Storage;
    using System.Threading.Tasks;
    using System.Diagnostics;
    using Windows.ApplicationModel;
    using Windows.ApplicationModel.Activation;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Media.Animation;
    using Windows.UI.Xaml.Navigation;
    // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=391641
    namespace BP_Alert
    /// <summary>
    /// Provides application-specific behavior to supplement the default Application class.
    /// </summary>
    public sealed partial class App : Application
    public static string DBPath = string.Empty;
    public static string LastUser = string.Empty;
    public static DateTime Time_Taken { get; set; }
    private TransitionCollection transitions;
    /// <summary>
    /// Initializes the singleton application object. This is the first line of authored code
    /// executed, and as such is the logical equivalent of main() or WinMain().
    /// </summary>
    public App()
    this.InitializeComponent();
    this.Suspending += this.OnSuspending;
    /// <summary>
    /// Invoked when the application is launched normally by the end user. Other entry points
    /// will be used when the application is launched to open a specific file, to display
    /// search results, and so forth.
    /// </summary>
    /// <param name="e">Details about the launch request and process.</param>
    protected async override void OnLaunched(LaunchActivatedEventArgs e)
    #if DEBUG
    if (System.Diagnostics.Debugger.IsAttached)
    this.DebugSettings.EnableFrameRateCounter = true;
    #endif
    Frame rootFrame = Window.Current.Content as Frame;
    // Do not repeat app initialization when the Window already has content,
    // just ensure that the window is active
    if (rootFrame == null)
    // Create a Frame to act as the navigation context and navigate to the first page
    rootFrame = new Frame();
    // TODO: change this value to a cache size that is appropriate for your application
    rootFrame.CacheSize = 1;
    if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
    // TODO: Load state from previously suspended application
    DBPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
    LastUser = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path,"LastUser.txt");
    bool result = await TryGetItemAsync(LastUser); <--Error!!!!!!!!!!!!!!!
    // Place the frame in the current Window
    Window.Current.Content = rootFrame;

    It seems that TryGetItemAsync is a method on a StorageFolder, so you will need to do something like:
    myStorageFolder.TryGetItemAsync(LastUser);
    See here:
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.storagefolder.trygetitemasync.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1
    If you go to that link and scroll down to the bottom of the page, it says:
    Minimum supported phone
    None supported

  • Tcode for checking that file is on the server

    what is the tcode for checking that file is on the server.
    thanks...

    Hi
    AL11.
    CG3Y/CG3Z.
    Regards,
    Sree

  • Checking for files in a folder -- Wrong output

    Hi guys,
    I'm writing a simple program, I have to check for 6 files (hardcoded, they will never change) if they are in certain directories/paths.
    The problem is, I think I have a problem in my IF statements, because it continueally returns false.
    The paths are on networked drives, does that make a difference?
    I'm rather stuck on this one, any help would be appreaciated.
    (some paths/file names have been replaced by "xxxxxxxxx", for security)
    * Checks for files in a directory, prints results.
    * @author Mitchell
    * @version 0.2
    * @date 28 Jul '05
    import java.awt.*;
    import java.io.*;
    import java.lang.Object;
    import javax.swing.*;
    import java.util.*;
    public class FileCheck extends JFrame
        //declare filenames/paths, add more if needed.
        String fileName1 = "file it2_load.txt";
        String fileName2 = "mo_batch.txt";
        String fileName3 = "mo_bcp.txt";
        String fileName4 = "mo_load.txt";
        String fileNameX = "IT2_1000_yyyymmdd.txt";
        String fileNameY = "IT2_2000_yyyymmdd.txt";
        //declare directories to search
        String fileLocation1 = "\\\\xxxxxxxxx\\aus_bear\\Patrol";
        String fileLocation2 = "\\\\xxxxxxxxx\\nz_bear\\Patrol";
        String fileLocation3 = "\\\\xxxxxxxxx\\bear\\remote\\RTS";
        String fileLocation4 = "\\\\xxxxxxxxx\\bear\\remote\\RTS";
        //declares array for filename storage. Change if needed.
        File fileNamesArray1[];
        File fileNamesArray2[];
        File fileNamesArray3[];
        File fileNamesArray4[];
        //set path to find files
        File filePath1 = new File(fileLocation1);
        File filePath2 = new File(fileLocation2);
        File filePath3 = new File(fileLocation2);
        File filePath4 = new File(fileLocation2);
        //string buffer to store results
        StringBuffer results = new StringBuffer();
        //start of FileCheck method
        public FileCheck()
            //collects all filenames from pre-set path1
            fileNamesArray1 = filePath1.listFiles();
            results.append("This program checks for files in given folders."
                            +"\nTRUE = File does exist in folder."
                            +"\nFALSE = File does not exist in folder.\n\n");
            results.append(fileLocation1 + "\n");
            //start for loop1 - check for pre-set filenames in path1
            for(int i=0; i < fileNamesArray1.length; i++)
                    if( fileName1.equals(fileNamesArray1.toString()))
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
    else if( fileName2.equals(fileNamesArray1[i].toString()))
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
    else if( fileName3.equals(fileNamesArray1[i].toString()))
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
    else if( fileName4.equals(fileNamesArray1[i].toString()))
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
    else
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> FALSE\n");
    } //end for loop1
    //collects all filenames from pre-set path2
    fileNamesArray2 = filePath2.listFiles();
    results.append("\n" + fileLocation2 + "\n");
    //start for loop2 - check for pre-set filenames in path2
    for(int j=0; j < fileNamesArray2.length; j++)
    if( fileName2.equals(fileNamesArray2[j].toString()))
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
    else if( fileName2.equals(fileNamesArray2[j].toString()))
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
    else if( fileName3.equals(fileNamesArray1[j].toString()))
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
    else if( fileName4.equals(fileNamesArray1[j].toString()))
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
    else
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> FALSE\n");
    } //end for loop2
    //collects all filenames from pre-set path1
    fileNamesArray3 = filePath3.listFiles();
    results.append("\n" + fileLocation3 + "\n");
    //start for loop3 - check for pre-set filenames in path1
    for(int k=0; k < fileNamesArray3.length; k++)
    if( fileNameX.equals(fileNamesArray3[k].toString()))
    results.append("PATH3 >> " + fileNamesArray3[k] + " >> TRUE\n" + fileNamesArray3[k].lastModified());
    else
    results.append("PATH3 >> " + fileNamesArray3[k] + " >> FALSE\n");
    } //end for loop3
    //collects all filenames from pre-set path4
    fileNamesArray4 = filePath3.listFiles();
    results.append("\n" + fileLocation4 + "\n");
    //start for loop4 - check for pre-set filenames in path1
    for(int l=0; l < fileNamesArray4.length; l++)
    if( fileNameY.equals(fileNamesArray4[l].toString()))
    results.append("PATH4 >> " + fileNamesArray4[l] + " >> TRUE\n" + fileNamesArray4[l].lastModified());
    else
    results.append("PATH4 >> " + fileNamesArray4[l] + " >> FALSE\n");
    } //end for loop4
    //construct displaybox for results
    JTextArea textArea = new JTextArea( results.toString() );
    textArea.setEditable(false); //disables modification of results
    Container container = getContentPane();
    container.add( new JScrollPane( textArea ) );
    setSize( 500, 500 ); // set window size
    setVisible( true ); //allow visibility
    //main
    public static void main (String args[])
    FileCheck window = new FileCheck();

    You could try using the File.exists() method.
    The paths are on networked drives, does that make a difference?Try the above on a local file and a networked file.
    I'm writing a simple program, Actually a simple program would be something like:
    File file = new File("xxx");
    System.out.println(file.exists());No need to include all the code you posted.
    http://www.physci.org/codes/sscce.jsp

  • Unable to check config files through EM in 10.1.3.3.0

    Hi All,
    I have OAS (10.1.3.3.0) webserver and appserver in installed on different machines.
    as we all know earlier release ie 10g(10.1.2) we can check all he config files like httpd.conf, ssl.conf etc through EM, but can we check config files in this relase ie.(10.1.3.3.0) through EM.
    Regards
    Kumar

    Kumar,
    Oracle HTTP Server (OHS) in 10.1.3.x can not be managed using AS Control (EM), like you could do it in 10.1.2.x. Not just viewing OHS's config files you can't also start/stop it, make config changes (server properties, performance directives, log configuration etc.), view performance metrics and log entries etc. This is mainly due to AS Control in 10.1.3.x is changed to be JMX based and OHS doesn't have any MBeans in 10.1.3.x. So OHS can't be managed and monitored (except seeing its up/down state) via AS Control in 10.1.3.x.
    FYI, OHS in next major release of Oracle Fusion Middleware (i.e. 11gR1) can be fully managed and monitored in AS Control but for now you will have to do it manually.
    Thanks
    Shail

  • Unable to check in file

    Hello,
    I am having issue with checking in files to TFS 2013. I use Team Explorer and Studio 2013.  This issue just came up recently (as of 12/18/2014). the server had no issue like this prior.
    Here is the issue
    1) create a team project named " testProject"
    2) add a file to source control "testfile1.txt"
    3) check the file "testfile1.txt" in
    4) check the file "testfile1.txt" out for editting
    5) add 1 line to  testfile1.txt using notepad
    6) check in file
    7) check out the file
    8) add line #2 to the file
    9) check in testfile1.txt: this step I get this error "All of the changes were either unmodified files or locks. The changes have been undone by the server."
    any suggestion to what the problem may be?

    Hi TDN,  
    Thanks for your post.
    You’re using TFS 2013 Update 4 and VS 2013 Update 4?
    According the error message, it seems TFS Server think this file is not changed.
    After step 8, if there’s the edited icon shows on your testfile1.txt in Source Control Explorer?
    Please click Refresh button in your Source Control Explorer, then re-edit your testfile1.txt file and try check-in again.
    And try to reproduce this scenario on your another client(VS 2013 installed), check if this issue can be reproduce on another client or not.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Editing XMP metadata in Bridge for checked-out files?

    Our custom connector does not implement the WRITE_XMP_METADATA Capability because we do not want to change the XMP of a file in our DAM system without checking in a new file version.
    However, when a file is checked out through Adobe Drive, we would expect to be able to edit its XMP metadata in Bridge just like we can for local files.
    It looks like this is still not possible with Adobe Drive 3, i.e. if your connector does not implement the WRITE_XMP_METADATA Capability you cannot edit XMP for checked out files either.
    It seems weird that you can edit XMP metadata for checked out files with regular CS applications but not with Bridge. Is this something that is expected to be fixed in a future version?
    Thanks

    In our design, editing XMP data in Bridge and in regular CS applications is different, the former one will be routed to SetXMPHandler in you connector, in the latter case, CS applications take the normal file writting ways to embed XMP data in the file content.
    The purpose of this design is to offer similar user experience for normal users when they edit XMP data for AD assets and local file assets, they don't need to check-out files first.
    To address your issue, I think you can add some codes in SetXMPHandler to auto check-out files before real XMP operation, and check-in them before exiting the handler
    We will consider to make some enhancements for this part, that's, to allow editng XMP data for the checked-out files in Br, in the next release, thanks for this advice.

  • I recently upgraded from Leopard to Snow Leopard and I noticed that I have more capacity available on the Macintosh HD. I checked my files and applications and they are still on my computer. Can capacity on the HD change after an OS upgrade?

    I recently upgraded from Leopard to Snow Leopard on my MacBook and I noticed that I have more capacity on the Macintosh HD than before the upgrade. I checked my files and applications and they are still on my computer and nothing appears to be missing. Before the upgrade I had around 111 GB capacity with around 10.50 GB available on the Mac HD but now after the upgrade I have 119 GB capacity and 20.92 GB available. Can capacity on the HD change after an OS upgrade?

    No, but the upgrade removed unneeded PowerPC code and changed the way free space is determined.
    (72071)

  • Check Outsourcing file for vendor payments question

    Hello everyone -
    Does anyone know HOW or IF SAP could produce a checkbook code for a check payment file? I have a large client who sends a file out of SAP yet they insist SAP doesnt have the capability to put a checkbook code identifier.
    In my experience I would think it could be handled based on the GL that it was being paid out of or maybe even handled in iDoc?
    THANKS in ADVANCE!

    When you raise a vendor invoice then it will be captured in BSIK, and as the payment takes place the value in BSIK will be cleared and the value appears in BASK. If the invoice is cleared or say the payment happened for the invoice then the cleared item will be captured in BSAK (Payment), there is no other table apart from these that capture the payment.
    Just tell you requirement clearly.

  • How to send the Checked-in file to the user in workflow as an attachment.

    Hi All ,
    I am using UCM 11g and i need to send email to the workflow users with the checked-in file as an attachment.Can anyone guide me how to customize or configure it in UCM 11g.
    Thanks !!!

    Hello,
    this is not a standard behaviour and I am not sure if I would even recommend you to go this way. Why?
    a) content items in workflows are usually still to be reviewed - if you send it as an attachment to an email, the user may forward it and you will by-pass all the security that UCM provides
    b) you will mess up version controls (which attachment is the correct one, if someone checks in a new version?)
    c) you will pass the content through the email server - this is something customers usually want to get rid of
    d) why can't you use just the standard workflow review functionality? - that is, instead of the file you send a link to the file, which usually displays its web-viewable rendition (but you can change it to the link to native files, if you want to) This is also a one-click solution (well, users may have to authenticate for UCM, if you have no single sign-on), and it is completely under control.
    However, if you stick to email attachments, you will have to go with a custom component. There is a sample AcmeEmail, which can serve as a basis for email functions, so you will need to combine it with workflows. But like I wrote - better try to persuade your customer to go with the standard.
    Jiri

Maybe you are looking for