How to list all properties in the default Toolkit

I would like to know what kinds of properties are stored in the default Toolkit (Toolkit.getDefaultToolkit()). I don't know how to list all of them. Toolkit class has a method getProperty(String key, String defaultValue), but without knowing a list of valid keys, this method is useless.
Any idea would be appreciated.

Here is a little utility that I wrote to display all the UIDefaults that are returned from UIManager.getDefaults(). Perhaps this is what you are looking for?
import javax.swing.*;
import java.util.*;
public class DefaultsTable extends JTable {
    public static void main(String args[]) {
        JTable t = new DefaultsTable();
    public DefaultsTable() {
        super();
        setModel(new MyTableModel());
        JFrame jf = new JFrame("UI Defaults");
        jf.addWindowListener(new WindowCloser());
        jf.getContentPane().add(new JScrollPane(this));
        jf.pack();
        jf.show();
    class MyTableModel extends javax.swing.table.AbstractTableModel {
        UIDefaults uid;
        Vector keys;
        public MyTableModel() {
            uid = UIManager.getDefaults();
            keys = new Vector();
            for (Enumeration e=uid.keys() ; e.hasMoreElements(); ) {
                Object o = e.nextElement();
                if (o instanceof String) {
                    keys.add(o);
            Collections.sort(keys);
        public int getRowCount() {
            return keys.size();
        public int getColumnCount() {
            return 2;
        public String getColumnName(int column) {
            if (column == 0) {
                return "KEY";
            } else {
                return "VALUE";
        public Object getValueAt(int row, int column) {
            Object key = keys.get(row);
            if (column == 0) {
                return key;
            } else {
                return uid.get(key);
    class WindowCloser extends java.awt.event.WindowAdapter {
        public void windowClosing(java.awt.event.WindowEvent we) {
            System.exit(0);
}

Similar Messages

  • How to remove "all day" as the default setting in iCal?

    How to remove "all day" as the default setting in iCal? The iCloud calendar works by double-clicking but the local behaves differently.

    Hello Valerie,
    the default - "all day" or "time based" - depends on the view in iCal. In month view the default is "all day",
    in week view or day view it is a time interval, if you use "File -> New Event". If you add the event by double clicking into the calendar, it will depend on the section you are clicking - in the all day section you will add an all-day event, in the time-grid you will enter an event with start-end time.
    Regards
    Léonie

  • How to list all users present in Default Autheticator  in WebLogic Security Realm

    Hi All,
    I need to get a list of all the users in my Weblogic server--> security realm--> Default Authenticator
    There are more than 1000 users present in my security realm for different different Authentication Providers. So I can not get these details from WebLogic Admin Console.
    Can anyone please help me in getting this list of all users in Default Authenticator? Please let me know how can I get these details.
    My WebLogic version is 10.3.4.0
    Thanks in Advance!

    You can use JMX to list users
    http://weblogic-wonders.com/weblogic/2010/11/10/list-users-and-groups-in-weblogic-using-jmx/

  • When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page.

    When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page. I don't want to have to check off an additional 5 or 6 attributes each time I print out contact information. Is there a way to change the default setting for printing lists, so it is not just "phone," "photo," and "job title?"

    I have a user who wants to do this same thing. I did not find any way either to default the attributes to anything other than what you see the first time. Seems like such a trivial thing, hard to believe they do not allow it. I did find a program for this called iDress but I can't seem to download it from any links on the Internet. Not sure if it is free or not, but it was recommended by a link on the Mac support site.

  • How do I get a longer list of items in the history window - and not have to click "Show All History"? The default list is too short.

    How do I get a longer list of items in the history window - and not have to click "Show All History"? The default list is too short.

    Well I figured it out… all you do say show commands :-/

  • How can I list all users and their DEFAULT tablespace?

    How can I list all users and their DEFAULT tablespace?
    Peter

    Peter, the following short article that lists the most heavily used Oracle rdbms dictionay views might be of interest based on your question:
    How do I find information about a database object: table, index, constraint, view, etc… in Oracle ? http://www.jlcomp.demon.co.uk/faq/object_info.html
    HTH -- Mark D Powell --

  • How to show all items in the reading list? I think this option has been removed in Safari Version 7.0.2

    How to show all items in the reading list? I think this option has been removed in Safari Version 7.0.2

    Thanks. That solved it. I had my doubts since I wasn't concerned about my lost bookmarks. I was concerned about the broken functionality. In any event, restoring from a backup solved both the functionality and the lost bookmarks. I appreciate the response!

  • How to list all the rows from the table VBAK

    Friends ,
    How to list all the rows from the table VBAK.select query and the output list is appreciated.

    Hi,
    IF you want to select all the rows for VBAK-
    Write-
    Data:itab type table of VBAK,
           wa like line of itab.
    SELECT * FROM VBAK into table itab.
    Itab is the internal table with type VBAK.
    Loop at itab into wa.
    Write: wa-field1,
    endloop.

  • How to list all files in a given directory?

    How to list all the files in a given directory?

    A possible recursive algorithm for printing all the files in a directory and its subdirectories is:
    Print the name of the directory
    for each file in the directory:
    if the file is a directory:
    Print its contents recursively
    else
    Print the name of the file.
    Directory "games"
    blackbox
    Directory "CardGames"
    cribbage
    euchre
    tetris
    The Solution
    This program lists the contents of a directory specified by
    the user. The contents of subdirectories are also listed,
    up to any level of nesting. Indentation is used to show
    the level of nesting.
    The user is asked to type in a directory name.
    If the name entered by the user is not a directory, a
    message is printed and the program ends.
    import java.io.*;
    public class RecursiveDirectoryList {
    public static void main(String[] args) {
    String directoryName; // Directory name entered by the user.
    File directory; // File object referring to the directory.
    TextIO.put("Enter a directory name: ");
    directoryName = TextIO.getln().trim();
    directory = new File(directoryName);
    if (directory.isDirectory() == false) {
    // Program needs a directory name. Print an error message.
    if (directory.exists() == false)
    TextIO.putln("There is no such directory!");
    else
    TextIO.putln("That file is not a directory.");
    else {
    // List the contents of directory, with no indentation
    // at the top level.
    listContents( directory, "" );
    } // end main()
    static void listContents(File dir, String indent) {
    // A recursive subroutine that lists the contents of
    // the directory dir, including the contents of its
    // subdirectories to any level of nesting. It is assumed
    // that dir is in fact a directory. The indent parameter
    // is a string of blanks that is prepended to each item in
    // the listing. It grows in length with each increase in
    // the level of directory nesting.
    String[] files; // List of names of files in the directory.
    TextIO.putln(indent + "Directory \"" + dir.getName() + "\":");
    indent += " "; // Increase the indentation for listing the contents.
    files = dir.list();
    for (int i = 0; i < files.length; i++) {
    // If the file is a directory, list its contents
    // recursively. Otherwise, just print its name.
    File f = new File(dir, files);
    if (f.isDirectory())
    listContents(f, indent);
    else
    TextIO.putln(indent + files[i]);
    } // end listContents()
    } // end class RecursiveDirectoryList
    Cheers,
    Kosh!

  • Urgent: How to list all alias for a server throw DNS query?

    Hi
    Is there anyone know how to list all alias for a server by asking the network DNS. Is that possible?
    It doesn't work with InetAddress it return a single result.
    Best regard

    InetAddress will not get you the aliases, but you can certainly find all the different IP addresses for a specific host name using the getAllByName() method.
    You won't be able to get the aliases since those IP addresses (assuming there are more than 1) will all be cached as mapping to the name you passed to the getAllByName() method and you can't clear the map cache until the JVM exits.
    So your best hope is to get a list of IP's and either exit your app and restart with a new mode, or save them to a file for another app to read.

  • How to fetch all properties with ejb3

    I have need to fetch all properties in a Query when loading Entity EJB's in ejb3.0. This is because I'm going to detach the entities from the EntityManager, but want all the properties to be loaded. I have some entities that have simple fields that are normally fetched lazily (BLOBs and CLOBs). I also have relationships to other entities that would also normally be fetched lazily. Finally, I'm trying to do this in generic code that looks like this:
    Query q = manager.createQuery("select o from " + variableNameOfOrmClass + " o");
    List l = q.getResultList();
    So, I can't really name the relationships and do a FETCH JOIN... but rather, I just want to tell the query to "fetch all properties". I also don't want to for EAGER fetching because the majority case is that I'm not going to detach objects from the EntityManager.
    Is there a simply way to tell EJBQL (EJB3.0) to fetch all properties at the query time?

    In this forum, I asked if there is a way to fetch all properties at query time. In the other, I asked if there is a way to force a load of all unfetched properties on an entity, or better yet, a collection of entities, that I've previously queried. Similar, but not the same.

  • How to make Excel, Word, Powerpoint the Default programs?

    Hey guys,
    Just got my new MBP, and I need to know how to make Excel, Word, Powerpoint the default programs when opening one of their files? Currently, the trial version of Iwork opens the programs which drives me crazy.....
    So, for example, for an Excel file, I want Excel to open it, NOT Numbers......etc....
    Thanks In advance.
    JW

    Select a file of that type in the Finder, choose Get Info from the File menu, change the Open With entry for it to the desired application, click on Change All, and confirm the action.
    (47808)

  • How do I make an application the default?

      I installed Microsoft Office 2011.  I do not want to use Outlook for mail.  I want to use Apple Mac Mail.  Sometimes Outlook opens instead of Mail.  For instance if I click on an email link in Safari.  How do I stop this? 
      How do I make an application the default?  This would be the same as make a file type open with a default application in Windows.
      I hope someone can help.  I have looked in all the help files and not found the answer.
    Joe from Ohio

    Re setting a default app for email -
    Start up Mail. Open Mail's Preferences (Preferences in the Mail menu). Go to the General tab if it does not open with that chosen. First item in that screen, "Default email reader" - use the pulldown menu to select the app you wish to use. Then close the Preferences window and quit Mail.
    Re setting a default app for a given file type -
    Select a file of that type by clicking it once, then press Command-I (Get Info in File menu). Look down in the Get Info window to the section "Open with:" - use the pulldown menu there to select the app you wish to use for that file type, then click the "Change All..." button. From then on, double-clicking any file of that type should open it using the app you set.

  • How can I make US letter the default print size in PSE12

    How can I make US letter the default print size in PSE12

    Clips from JVC Everio camcorders have always had this problem with Premiere Elements (all versions). You need to select Interpret Footage.
    See this FAQ from PE version 2, step 3. Like I said it has been this way with all versions:
    http://www.adobeforums.com/webx/.3bc1265c
    You might be able to use this tool to change the header of your MOD files so they are seen as 16:9: http://www.videohelp.com/tools/DVDPatcher
    Or use this program (SDCopy) to download the video's from the cam, it will allow you to copy straight from the cam to your PC and auto renames and corrects the aspect ratio.
    http://zyvid.com/smf/index.php?action=dlattach;topic=280.0;id=153

  • How can I make GRID view the default view? The icons for view that used to be located in the upper right top of the page near the 'search library' are gone.

    How can I make GRID view the default view? The icons for view that used to be located in the upper right top of the page near the 'search library' are gone.

    99jon wrote:
    Perhaps it’s a design feature to speed up the Organizer launch.
    I am sure it is.
    - The normal use of the Organizer is not the folder view, it's the thumbnail view with an organization based on categories and folder. That way you should forget completely where your pictures are stored. Anyway, the folder view in the Explorer is not a map of the location of the different bits of your file, it's only a logical representation. That's easy to see when you are doing a defragmentation.
    - The folder view is useful even for those using normally the thumbnail view, but that is only for rare cases when you must change the folder organization, for instance moving files to another drive. The folder view is here to prevent you from changing things from the explorer and outside of the Organizer.
    - The new folder list view, which you find 'funny' is there to help better organizing using tags. Its huge advantage is that such a view is created extremely quickly by extracting the last subfolder in the media table : it's the way the database sees the folders, based on its own content,  totally ignoring the complex folder organization of your disk with media files or any unrelated other kind of data. You should use it in many cases, the main purpose being assigning tags when you have assigned descriptive folder names. I had suggested such a solution to prevent the long standing bugs in the folder view of previous versions.
    So yes, the purpose is:
    - to speed up switching modes
    - to help folder organization fans to migrate to tags organization
    - to hopefully get rid of the old folder organization bugs

Maybe you are looking for