How get File Type Icon Image

how get File Type Icon Image (Windows )
FileSystemView.getSystemIcon( File );works in swing application, can not be used for javafx.scene.image.ImageView;

Hmm, good question.
Looking at the FileChooser, it looks like the native chooser is used so possibly the JFX guys didn't have to expose access to the icons to make it work. You might want someone to confirm, but my guess is there is no equivalent yet in JFX.
Assuming there's nothing, you could try the hacks in here to convert the image: Image conversion between AWT and FX
Failing that you're probably looking at raising a JIRA feature request to get it in a future release.
Cheers,
zonski
Did you find this answer useful? If so, please mark as 'Correct' or 'Helpful'.

Similar Messages

  • How to get File type icon for files store on Amazons3

    Hi,
    i want to know about how to get file type icons for files that we store on Amazons3.i am a devloper ,i want to make gui for accessing amazons3.
    so ,i want to know about how to get file type icons for files that we store on Amazons3.
    thanx in advance.

    hi,
    have u heard amazon simple storage service,that provides storage space for
    storing files, i am a devloper,i want to know the files that we store on amazon,how we can get file type icon for that files.
    i want to sample code in java for this.
    thanx in advance.

  • Large os file type icon

    Hi,
    I using FileSystemView to get file type icon. But the icon dimension i am getting is either 16x16 or 32x32.
    Can any one tell me, how to get bigger icons like windows vista have large icons view. upto 256x256

    Mayby this code can help:
        FileSystemView view = FileSystemView.getFileSystemView();
         ShellFolder shellFolder = ShellFolder.getShellFolder(new File("xx.gif"));
    import java.io.File;
    import java.io.IOException;
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.JLabel;
    import javax.swing.BoxLayout;
    import javax.swing.filechooser.FileSystemView;
    import sun.awt.shell.ShellFolder;
    public class FileIconExtractor extends JFrame implements ActionListener{
    private JButton getIconBtn = new JButton("get Icon");
    private JPanel iconPanel = new JPanel();
    private JTextField extField = new JTextField();
    private JLabel smallIconLabel = new JLabel("small Icon here");
    private JLabel bigIconLabel = new JLabel("big Icon here");
    public FileIconExtractor() {
    this.setSize(200, 150);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setLayout(new BorderLayout());
    getIconBtn.setActionCommand("GETICON");
    getIconBtn.addActionListener(this);
    iconPanel.setLayout(new BoxLayout(iconPanel, BoxLayout.Y_AXIS));
    iconPanel.add(smallIconLabel);
    iconPanel.add(bigIconLabel);
    this.add(extField, BorderLayout.NORTH);
    this.add(iconPanel, BorderLayout.CENTER);
    this.add(getIconBtn, BorderLayout.SOUTH);
    this.setVisible(true);
    public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals("GETICON")) {
    String ext = extField.getText();
    File file;
    try
          file = File.createTempFile("icon", "." + ext);
          FileSystemView view = FileSystemView.getFileSystemView();
          Icon smallIcon = view.getSystemIcon(file);
          ShellFolder shellFolder = ShellFolder.getShellFolder(file);
          Icon bigIcon = new ImageIcon(shellFolder.getIcon(true));
          setIconLabel(smallIcon, bigIcon);
          file.delete();
    catch (IOException ioe)
    ioe.printStackTrace();
    private void setIconLabel(Icon smallIcon, Icon bigIcon) {
    smallIconLabel.setIcon(smallIcon);
    bigIconLabel.setIcon(bigIcon);
    public static void main(String[] args) {
    FileIconExtractor fie = new FileIconExtractor();
    }

  • How to make an icon image using Photoshop

    I found out how to do this recently so I decided that I wanted to make a tut for those who don't know how to make an icon image. This icon image is for the libraries tab on your computer. Under the libararies tab there is Music, Pictures, Documents, and Photos
    First you will need the ICO (Icon image format) Format extension for photoshop which can be downloaded here:
    http://www.telegraphics.com.au/svn/icoformat/trunk/dist/README.html
    The download link and tutorial on how to install it is all in the link above.
    Once you have that all set you can now launch photoshop to create your icon image. Once you have launched it, create a new document with the size as in the image below.
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/256x256_zpsbf3dcf8e.png~original[/IMG]
    Create the image you want. I used a simple one by using the custom shape tool by pressing "U" on your keyboard and with the
    basic blending options.
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/IconImage_zpsd788c709.png~original[/IMG]
    The reason why the image is pixelated is because it is an icon image. Since the image is only 256x256 pixels when you zoom in on it that will get you the pixely result. The reason why I zoomed  in is so you can see it. But don't worry this is no the end result. Just continue reading and you will see.
    So once you have created the icon go ahead and press
    file>save as>(under format choose the ICO)>and choose the name that you want to name it. And save it in your C: drive. You will see why to save it in your C: drive in a sec.
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/SampleicoPic_zpsd252bfba.png~original[/IMG]
    So now that you have created the icon and saved it now you can create the new library.
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/NewLibrary_zps8ca703b2.png~original[/IMG]
    Name the library whatever you want I named it "Sample" for tutorial purposes. Notice how it gives you a default boring icon image for your library.
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/Sample1_zpsb5472840.png~original[/IMG]
    So now once you have created and named your library now it is time to get the icon image into place.
    Go to computer/c: Drive/users/YOU/ And now once you have reached this area you will need to access a hidden folder named "appdata" to do so press "Alt" then a menu bar will show. Click
    tools>folder options>and view. Find the option to view hidden folders then press apply then ok. Now we shall continue so AppData>Roaming>Microsoft>Windows>Libraries
    Now you should see all the libraries including the one you just created.
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/showhiddenfolder_zpsad4a3c94.png~orig inal[/IMG]
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/Libraries_zpsf6243bc0.png~original[/IMG]
    Once you have reached your destination then open a new text document with notepad and drag the library you just created in notepad. The result should look like this:
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/Notepad_zps251a86f0.png~original[/IMG]
    once you have reached this point click at the end of the second to last line down then press enter and enter in this information
    <iconReference>c:\"NAME OF ICO FILE YOU CREATED IN PS".ico</iconReference>
    Example:
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/iconreference_zps1c1a3eca.png~origina l[/IMG]
    Once you have entered that information go to file>save and the icon image should appear on the library you created.
    [IMG]http://i1297.photobucket.com/albums/ag25/dusty951512/Finished_zps267f893a.png~original[/IMG]
    Now you are officially finished. Go and spread the news and joy. Bye for now
    -Dusty951512

    It is Windows only because all those screen shots are exclusively Windows, the file structure and paths do not resemble those of the Mac in the least.  As a Mac user, there's nothing I could take from your tutorial.  Sorry, 
    No drives named with letters like C: on the Mac, for instance.  No backward slashes either, ever.  No such paths either.  No "Notepad" on the Mac, we use TextEdit; but such a text editor is not remotely needed on the Mac to make and/or edit icons.  Etc.
    Those folders are not even called "Libraries" on the Mac…  Nothing resembling your tutorial at all.
    The icons in the Finder's Sidebar are not customizable at all in recent version of OS X.
    =  =  =
    You can edit any post of yours only until someone replies to it.  At this time your post is not editable by you any longer.

  • PDF File Type Icon Not Displaying HELP!!!

    Hey guys!
    I have a quick question that I need resolved. Make sure you READ before you respond as people seem to be having trouble with this one.
    Something happened on my system to where .pdf files aren't displaying the PDF file type image anymore. They're just displaying the Windows default non-associated file icon.
    But the weird thing is that the .pdf file type IS associated with Adobe Acrobat, and when double clicked they DO open in Acrobat.
    I checked inside of Acorbat.dll and the file type icon IS in there...so this is leading me to believe that something is messed up in the registry to where Windows doesn't know to link a .pdf with the icon inside of Acrobat.dll.
    So my question is this...how do I RELINK the .pdf file type with the PDF file type icon located inside of Acrobat.dll???

    Before you start editing the registry try the suggestions given in the FAQ:
    http://www.adobeforums.com/webx/.3bbc2da9
    failing that try doing a repair of acrobat from the help menu.
    If still no joy let us know.

  • Why is Get File Type.vi password protected

    Hi...  We have a code that was developed in LabVIEW 8.6...  We have a need to attempt to save this code all the way back to version 7.1...  I saved it back from 8.6 --> 8.5 --> 8.2.1 --> 8.0 with no issues...  But when I then try to save it back from 8.0 to 7.1 I encounter one LabVIEW 8 vi that has no equivalent functionality in 7.1...  And that one vi is
    C:\Program Files\National Instruments\LabVIEW 8.x\vi.lib\Utility\lvfile.llb\Get File Type.vi
    When I look at that vi in 8.x, to endeavor to see if I can replace its functionality by writing some code in 7.1, I find that the Get File Type.vi is password protected...  More out of curiousity than anything, why is that code password protected???  I wasn't aware that any of the standard purchased LabVIEW code came password protected...  Can anyone tell me why that is???  thanks...  bob..
    Solved!
    Go to Solution.

    That VI is using an internal callback into LabVIEW (i.e. non G-based code) to determine the type of the file.  I'm guessing the callback doesn't exist in 7.1, so you would need to write your own G-based implementation for getting the type of a file  in the 7.1 case.  The simplest solution would be to work with the extensions of the files...not perfect, but probably close enough assuming your files are well-named.  Also, the following VI can give you a bit more information about LabVIEW-specific files (independent of extension):
    LabVIEW 7.1\vi.lib\Utility\libraryn.llb\Librarian Get Info.vi
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • File type icons in CS6 Design and Web Premium

    Hello everyone.
    I am running Windows 7, 64 bit. I have recently upgraded from CS5.5 Design Premium to CS6 Design and Web Premium.
    I the process, I lost the association of file types (such as .psd) with their relevant programs, which I have now recified.
    However, the filetype icons that are associated with each program, in most cases, don't seem to have assigned themselves to their respecitive icons. For example, .psd files now show as a white document with the blue Ps square icon in the centre, and the same for InDesign etc. Oddly, Illustrator has worked and has assigned it's icons correctly.
    For example:
    I can't find a method of editing specific file types icons - even then, I wouldn't know where to find the particular icon sets.
    Any ideas?
    Thanks in advance either way.

    I used the CS Cleaner (http://www.adobe.com/support/contact/cscleanertool.html) and followed the steps its really easy.. but ur gonna have to re install you Creative Suite   all u do for the cleaner is open it up then select english (e) ->enter->Agree (Y)->enter->All (1) (which is the first option for a full clean i guess)->enter->Product Number its just basically asking you to input your choice number again (1)->enter and should tell u its all done then after u install CS again go to start-> default programs->associate file type->.psd for example->double click it and select Photoshop even though its probably already selected >.< but just do it again cuz it will refresh all the files on the coputer and whala you should c the correct file dysplay Heres pictures of my files before and after as proof

  • Missing or wrong file type icons

    Got my new Retina iMac this week (running OS X 10.10 of course) and went through and downloaded/installed all my lovely programs but now some of the file type icons are showing up as awful exec type file icons (see below).
    All the .indd files were created in the same version Adobe InDesign CC 2014 and InDesign is set as the default program for all these file types, but as you will be able to see, some have that awful black icon. Blergh!
    Any suggestions?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • How do you restore icon images on your itouch

    How do you restore icon images on your itouch?

    I am confused. What do y mean by playlists not there but music is?
    Maybe:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • How get Mime Types of File/image

    I would like to get the MIME type all image/files inside a
    folder

    http://techfeed.net/blog/index.cfm/2007/3/16/Discover-MIME-type-in-ColdFusion
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • How Can I Save Picture as an .ico File Type (icon)?

    Hello. I have a picture that I want to use for an application's icon, and I was hoping that I could create the icon in PhotoShop Elements 6.
    I do not see any way to do this, however. That file-type option is not available in either "Save As" or "Export."
    Does anyone know how to do this?
    I did a Google search and saw where I would need to download a plug-in. If this is true, can anyone recommend a good plug-in? (I'm a little paranoid about what I download on my computer).
    Any assistance would be greatly appreciated.

    The Best way to create a .ico is in Photoshop Extended (photoshop CC cannot).
    open your file,
    size it edit all the way you want,
    then Image/Mode/
              set the color to RGB Color (only) and
              set it to 8 bits/channel.
              it will give you a message
               click ok or yes.
       4. Then save as
                 and in the Format dropdown choose, ICO,
                 save it
                 then gives you a choice of Standard ICO and PNG,
    I pick Standard ICO and click ok. you done.

  • How to Get File type in webdynpro abap

    Hi,
    I am using File Upload UI element of webdynpro ABAP to upload data  into SAP table. I want that the file type should only be tab delimited. How to get the file type to validate the same.
    Regards,
    Dhiraj Mehta

    hi,
    just follow the link :
    http://help.sap.com/saphelp_40b/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
    Hope this will help u!!!
    thanks & regards,
    punit raval.

  • How to get file type within SPFile

    Hi,
    I have a document library and I would like to get the type of document so it can be displayed for the user
    Currently I have this code
    foreach (SPListItemVersion version in item.Versions)
    if (version.Level == SPFileLevel.Published)
    string fileicon = version.ListItem.File.IconUrl;
    string filetype = version.ListItem.File.Item.ContentType.Name;
    string filesize = (version.ListItem.File.Length / 1024).ToString();
    string filetitle = version.ListItem.File.Item.Title;
    string filepath = version.ListItem.File.ServerRelativeUrl;
    Within the code I get the "ListItem.File.Item.ContentType.Name" and this always returns "Document" even if its a Word Document, Spreadsheet, jpg or PDF.
    I really want to display, Document, spreadsheet, pdf, etc etc
    How do I get this property??
    Thanks
    Marc

    You can use the ListItem.File.Name property to get the full file name including the extension, you could then parse this to get just the extension and determine the file type based on that.
    Note that when parsing the file name, if you try to do it by splitting the filename using the period symbol "." as the seperator you will need to allow for file names which contain multiple period symbols. You may be able to use the System.IO.FileInfo class to help, it has an instance property 'Extension' which should take care of that for you, though getting an SPFile into a FileInfo object may be more hassle than just writing your own quick parser, I haven't tried it.

  • How to get file type

    Hi,
    Can anyone help me on how to find the input file type i.e. pdf or txt or word.
    Is there any function similar to what we have to get the filename in OSB.
    In fact I have a requirement where I have to send a mail with the attached incoming file and the incoming file can be of any type.
    Please help me as I need this urgently.
    Thanks in advance...
    Regards,

    Hi,
    You can use xquery function tokenize($input,$pattern) to separate file name extension alone from complete file name.
    And for sending email with attachments follow this tutorial. http://blogs.oracle.com/christomkins/2009/04/sending_an_email_with_an_attac.html.
    Thanks,

  • How to create new icon / image to appear in Mobile Sales.

    I have a requirement to colour a field depending on its numeric value.... I realise that colour is not possible in mobile, so an alternative work around would be to use icons, or images (of three traffic lights - red, amber, green) which I could make visible using coding logic. My question is, how do I get the Tile control 'Image' to work? I have dragged the image icon across onto the capoverview4 tile, and positioned it, but the image is of nothing.... there appears to be nowhere to specify the image source (a bitmap). How do I set this up? (In the properties of the image, I have two fields Image File Binary - which has nothing in its dropdown and accepts no manually entered value, and also File Extension - which also has nothing in its dropdown and accepts no manually entered value).
    I am using MDW 70SP4.

    Hi Richard,
    The two properties indicates the image file name and its extension type as mentioned below.
    ImageFile Binary
    Select the name of the image file (without its extension). If the control is bound to a data source, select the property with which you want to associate the image file binary of the control.
    ImageFile Extension
    Select the file extension of the image file. If the control is bound to a data source, select the property for the image control.
    More info :
    http://help.sap.com/saphelp_crm52/helpdata/en/9a/15f9392486ce1ae10000000a114084/frameset.htm
    Navigate to Mobile Client Application Customization --> User Interface Customization --> Model a Tile --> Adding Controls to a Tile --> Defining an Image Control
    Other Option is, in the application code we can define controls value as shown below
    ctrlctrlProdImg.Value = "<path>" (Ex: C:\Image.jpg)
    In the framework it will converted to ctrlctrlProdImg.Image = "<path>"
    Better if we map the value in the application code level.
    Hope this helps
    Best Regards,
    Ravi.

Maybe you are looking for