How to start TreeCellEditor apart from default behaviors

Hi,
I'm trying to find the way to start TreeCellEditor apart from default behaviors which are triple mouse click, click-pause-click and F2 (in Windows).
The only way I found for starting editor in tree is JTree.startEditingAtPath. However the problem is I designed to separate the action(model) from the tree (view). So In my action class, it knows only TreeModel but not JTree.
How could I set my action class to tell the JTree to start editor? Is there any approach to do so but do not break my design?
Thanks in advance.

I had to do a custom JTree to get my editor to work the way you wanted.
I needed mine to allow a double mouse click. Then when in edit mode have the text default to a 'select all'.
All of the 'Rollup' items are custom objects but this should give you an idea of what to do.
class CustomUI extends BasicTreeUI
    protected boolean startEditing(TreePath path, MouseEvent event) {
        // default to standard behavior
        boolean result = super.startEditing(path, event);
        // start editing this node?
        if (result) {
            // start peeling the object to get a handle to the editor
            RollupTree rollupTree = (RollupTree) event.getSource();
            RollupTreeEditor editor = (RollupTreeEditor) rollupTree.getCellEditor();
            // set Icon if node a trader
            RollupNode node = (RollupNode) rollupTree.getSelectionPath().getLastPathComponent();
            if (node.isTrader()) {
                editor.setEditorIcon(IconLoader.getIcon("Trader.png"));
            JTextField textField = editor.getEditor();
            // they want to default so that the edit text
            // is in selected mode when they first start to edit the field
            textField.selectAll();
        return result;
    }I also did a custom default editor which looks like:
class RollupTreeEditor extends DefaultTreeCellEditor
    public RollupTreeEditor(final JTree tree, final RollupTreeCellRenderer renderer) {
        super(tree, renderer);
     * Allow people to toggle the icon when in edit mode
     * @param editor Icon
    public void setEditorIcon(Icon editor) {
        editingIcon = editor;
     * If the <code>realEditor</code> returns true to this
     * message, <code>prepareForEditing</code>
     * is messaged and true is returned.
     * @param event EventObject
     * @return boolean
    public boolean isCellEditable(EventObject event) {
        if (event instanceof MouseEvent) {
            // double click for edit
            if (((MouseEvent) event).getClickCount() == 2) {
                return true;
        return false;
    public DefaultTextField getEditor() {
        return (DefaultTextField)this.editingComponent;
}Then in my custom JTree I set these up like...
        // turn on tooltips
        ToolTipManager.sharedInstance().registerComponent(this);
        // used by two setters so create reference
        RollupTreeCellRenderer renderer = new RollupTreeCellRenderer();
        // customizing the icons for the tree
        // setting the folder icons
        // renderer.setOpenIcon(IconLoader.getIcon("Open.gif"));
        // renderer.setClosedIcon(IconLoader.getIcon("Folder.gif"));
        renderer.setLeafIcon(null); // drop the icon
        // add renderer to highlight Inventory nodes with Red or Blue text
        setCellRenderer(renderer);
        // set the editor
        setCellEditor(new RollupTreeEditor(this, renderer));
        // set UI to over ride editing event method
        setUI(new CustomUI());A nice touch is to add a mouse listener so if the user clicks out of the editor it cancels the edit mode. So here is the simple call:
        tree.addMouseListener(new MouseAdapter()
            public void mouseClicked(MouseEvent e) {
                // get handle to tree
                RollupTree tree = (RollupTree) e.getSource();
                // exit editor if in edit mode
                tree.getCellEditor().stopCellEditing();
            public void mouseReleased(MouseEvent e) {
                if (e.isPopupTrigger()) {
                    menu.show(e.getComponent(), e.getX(), e.getY());
        });Does this help answer your question?

Similar Messages

  • Hello, sombody knows how to start MS Excel from LabView (version 8.2)? Thanks

    Hello, sombody knows how to start MS Excel from LabView (version 8.2)? Thank you in advance.
    Regards Robert

    In the example finder  ">Help>Find Examples >>search for Excel", you'll find a sample program called "ActiveX Event Callback for Excel".
    It opens the Excel Application..  You can build on this to open/create new worksheet(s), etc.
    RayR
    Message Edited by JoeLabView on 06-20-2007 08:21 AM
    Attachments:
    OpenExcel.PNG ‏34 KB

  • How can I stop Finder from defaulting to All Files in 10.8.2?

    How can I stop Finder from defaulting to All Files in 10.8.2? Thanks.

    bnfrsrYour other post asked for help here, but it looks like the question has already been answered above by William Lloyd.
    Finder / Preferences / General ... change this
    To this, for example, or one of the other options for "New Finder windows show":

  • How to start managed server from admin server both running

    I have an admin server on one machine and created a managed server on different
    machine, I am not able to start managed server from either machine. When I used
    the admin server machine to start the managed server remotely I got this message
    Connecting to http://fkeita:7001...
    <Jul 17, 2002 11:11:06 AM EDT> <Notice> <Security> <090082> <Security initializi
    ng using realm myrealm.>
    <Jul 17, 2002 11:11:06 AM EDT> <Notice> <WebLogicServer> <000328> <Starting WebL
    ogic Managed Server "managedserver3" for domain "admindomain">
    <Jul 17, 2002 11:11:28 AM EDT> <Emergency> <WebLogicServer> <000350> <Unable to
    create a server socket on Channel Default for: BFINKELMAN/90.0.0.25, port: 8002.
    java.net.BindException: Cannot assign requested address: JVM_Bind Perhaps the
    a
    ddress BFINKELMAN/90.0.0.25 is incorrect or another process is using port 8002.>
    <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <Security> <090085> <Server failed
    to
    bind to any port such that it is not reachable from the console.>
    <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <WebLogicServer> <000342> <Unable to
    initialize the server: Fatal initialization exception>
    When I tried to connect managed server from its machine to admin server (running
    on separate machine ) I got this error
    Starting WebLogic Server...
    Connecting to http://fkeita:7001...
    <Jul 17, 2002 11:15:18 AM EDT> <Notice> <Security> <090082> <Security initializi
    ng using realm myrealm.>
    <Jul 17, 2002 11:15:18 AM EDT> <Critical> <WebLogicServer> <000364> <Server fail
    ed during initialization. Exception:java.lang.SecurityException: Authentication
    for user system denied
    java.lang.SecurityException: Authentication for user system denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    >
    <Jul 17, 2002 11:15:18 AM EDT> <Emergency> <WebLogicServer> <000342> <Unable to
    initialize the server: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication for user system denied
    java.lang.SecurityException: Authentication for user system denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    >
    The WebLogic Server did not start up properly.
    Exception raised:
    java.lang.SecurityException: Authentication for user system denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    Reason: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication for user system denied
    java.lang.SecurityException: Authentication for user system denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    Thanks.

    "fkeita" <[email protected]> wrote in message
    news:[email protected]...
    >
    I have an admin server on one machine and created a managed server ondifferent
    machine, I am not able to start managed server from either machine. When Iused
    the admin server machine to start the managed server remotely I got thismessage
    >
    Connecting to http://fkeita:7001...
    <Jul 17, 2002 11:11:06 AM EDT> <Notice> <Security> <090082> <Securityinitializi
    ng using realm myrealm.>
    <Jul 17, 2002 11:11:06 AM EDT> <Notice> <WebLogicServer> <000328><Starting WebL
    ogic Managed Server "managedserver3" for domain "admindomain">
    <Jul 17, 2002 11:11:28 AM EDT> <Emergency> <WebLogicServer> <000350><Unable to
    create a server socket on Channel Default for: BFINKELMAN/90.0.0.25, port:8002.
    java.net.BindException: Cannot assign requested address: JVM_Bind Perhapsthe
    a
    ddress BFINKELMAN/90.0.0.25 is incorrect or another process is using port8002.>
    >
    Try running netstat to see whether another process is actually running at
    the given address/port.
    Also check using ifconfig/ipconfig or directly checking /etc/hosts file of
    the box to see whether the ips addreses are correct.
    <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <Security> <090085> <Serverfailed
    to
    bind to any port such that it is not reachable from the console.>
    <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <WebLogicServer> <000342><Unable to
    initialize the server: Fatal initialization exception>
    When I tried to connect managed server from its machine to admin server(running
    on separate machine ) I got this error
    Starting WebLogic Server...
    Connecting to http://fkeita:7001...
    <Jul 17, 2002 11:15:18 AM EDT> <Notice> <Security> <090082> <Securityinitializi
    ng using realm myrealm.>
    <Jul 17, 2002 11:15:18 AM EDT> <Critical> <WebLogicServer> <000364><Server fail
    ed during initialization. Exception:java.lang.SecurityException:Authentication
    for user system denied
    java.lang.SecurityException: Authentication for user system denied
    atweblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    atweblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    >Seems to be some issue with security credentials.
    Try running the manageed server directly (as sort of admin) by not passing
    the admin server url and bringing it just like an admin server.
    See if this works. If it works, then soemthing wrong in the way the admin
    server is receiving the request/security credentials from managed server.
    Also make sure both managed and admin servers are on the same patch/service
    pack level.
    -Sabha

  • How to start managed server from admin server both running on separate machines

              I have an admin server on one machine and created a managed server on different
              machine, I am not able to start managed server from either machine. When I used
              the admin server machine to start the managed server remotely I got this message
              Connecting to http://fkeita:7001...
              <Jul 17, 2002 11:11:06 AM EDT> <Notice> <Security> <090082> <Security initializi
              ng using realm myrealm.>
              <Jul 17, 2002 11:11:06 AM EDT> <Notice> <WebLogicServer> <000328> <Starting WebL
              ogic Managed Server "managedserver3" for domain "admindomain">
              <Jul 17, 2002 11:11:28 AM EDT> <Emergency> <WebLogicServer> <000350> <Unable to
              create a server socket on Channel Default for: BFINKELMAN/90.0.0.25, port: 8002.
              java.net.BindException: Cannot assign requested address: JVM_Bind Perhaps the
              a
              ddress BFINKELMAN/90.0.0.25 is incorrect or another process is using port 8002.>
              <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <Security> <090085> <Server failed
              to
              bind to any port such that it is not reachable from the console.>
              <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <WebLogicServer> <000342> <Unable to
              initialize the server: Fatal initialization exception>
              When I tried to connect managed server from its machine to admin server (running
              on separate machine ) I got this error
              Starting WebLogic Server...
              Connecting to http://fkeita:7001...
              <Jul 17, 2002 11:15:18 AM EDT> <Notice> <Security> <090082> <Security initializi
              ng using realm myrealm.>
              <Jul 17, 2002 11:15:18 AM EDT> <Critical> <WebLogicServer> <000364> <Server fail
              ed during initialization. Exception:java.lang.SecurityException: Authentication
              for user system denied
              java.lang.SecurityException: Authentication for user system denied
              at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
              SecurityServiceManager.java:978)
              at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
              erviceManager.java:1116)
              at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
              at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
              at weblogic.Server.main(Server.java:31)
              >
              <Jul 17, 2002 11:15:18 AM EDT> <Emergency> <WebLogicServer> <000342> <Unable to
              initialize the server: Fatal initialization exception
              Throwable: java.lang.SecurityException: Authentication for user system denied
              java.lang.SecurityException: Authentication for user system denied
              at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
              SecurityServiceManager.java:978)
              at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
              erviceManager.java:1116)
              at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
              at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
              at weblogic.Server.main(Server.java:31)
              >
              The WebLogic Server did not start up properly.
              Exception raised:
              java.lang.SecurityException: Authentication for user system denied
              at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
              SecurityServiceManager.java:978)
              at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
              erviceManager.java:1116)
              at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
              at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
              at weblogic.Server.main(Server.java:31)
              Reason: Fatal initialization exception
              Throwable: java.lang.SecurityException: Authentication for user system denied
              java.lang.SecurityException: Authentication for user system denied
              at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
              SecurityServiceManager.java:978)
              at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
              erviceManager.java:1116)
              at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
              at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
              at weblogic.Server.main(Server.java:31)
              Thanks.
              

              I used startmanagedweblogic managedserver1 http://fkeita:7001 to try to start managed
              server, but it did not work, and got error messages. Error messages are posted
              on my first posting.
              "pankaj" <[email protected]> wrote:
              >Use the startManagedWeblogic.cmd / .sh script to start your
              >Managed/Clustered servers
              >
              >
              >"fkeita" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> I have an admin server on one machine and created a managed server
              >on
              >different
              >> machine, I am not able to start managed server from either machine.
              >When I
              >used
              >> the admin server machine to start the managed server remotely I got
              >this
              >message
              >>
              >> Connecting to http://fkeita:7001...
              >> <Jul 17, 2002 11:11:06 AM EDT> <Notice> <Security> <090082> <Security
              >initializi
              >> ng using realm myrealm.>
              >> <Jul 17, 2002 11:11:06 AM EDT> <Notice> <WebLogicServer> <000328>
              ><Starting WebL
              >> ogic Managed Server "managedserver3" for domain "admindomain">
              >> <Jul 17, 2002 11:11:28 AM EDT> <Emergency> <WebLogicServer> <000350>
              ><Unable to
              >> create a server socket on Channel Default for: BFINKELMAN/90.0.0.25,
              >port:
              >8002.
              >> java.net.BindException: Cannot assign requested address: JVM_Bind
              >Perhaps
              >the
              >> a
              >> ddress BFINKELMAN/90.0.0.25 is incorrect or another process is using
              >port
              >8002.>
              >>
              >> <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <Security> <090085> <Server
              >failed
              >> to
              >> bind to any port such that it is not reachable from the console.>
              >> <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <WebLogicServer> <000342>
              ><Unable to
              >> initialize the server: Fatal initialization exception>
              >>
              >> When I tried to connect managed server from its machine to admin server
              >(running
              >> on separate machine ) I got this error
              >>
              >> Starting WebLogic Server...
              >> Connecting to http://fkeita:7001...
              >> <Jul 17, 2002 11:15:18 AM EDT> <Notice> <Security> <090082> <Security
              >initializi
              >> ng using realm myrealm.>
              >> <Jul 17, 2002 11:15:18 AM EDT> <Critical> <WebLogicServer> <000364>
              ><Server fail
              >> ed during initialization. Exception:java.lang.SecurityException:
              >Authentication
              >> for user system denied
              >> java.lang.SecurityException: Authentication for user system denied
              >> at
              >weblogic.security.service.SecurityServiceManager.doBootAuthorization(
              >> SecurityServiceManager.java:978)
              >> at
              >weblogic.security.service.SecurityServiceManager.initialize(SecurityS
              >> erviceManager.java:1116)
              >> at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
              >> at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
              >> at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
              >> at weblogic.Server.main(Server.java:31)
              >> >
              >> <Jul 17, 2002 11:15:18 AM EDT> <Emergency> <WebLogicServer> <000342>
              ><Unable to
              >> initialize the server: Fatal initialization exception
              >> Throwable: java.lang.SecurityException: Authentication for user system
              >denied
              >> java.lang.SecurityException: Authentication for user system denied
              >> at
              >weblogic.security.service.SecurityServiceManager.doBootAuthorization(
              >> SecurityServiceManager.java:978)
              >> at
              >weblogic.security.service.SecurityServiceManager.initialize(SecurityS
              >> erviceManager.java:1116)
              >> at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
              >> at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
              >> at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
              >> at weblogic.Server.main(Server.java:31)
              >> >
              >>
              >***************************************************************************
              >> The WebLogic Server did not start up properly.
              >> Exception raised:
              >> java.lang.SecurityException: Authentication for user system denied
              >> at
              >weblogic.security.service.SecurityServiceManager.doBootAuthorization(
              >> SecurityServiceManager.java:978)
              >> at
              >weblogic.security.service.SecurityServiceManager.initialize(SecurityS
              >> erviceManager.java:1116)
              >> at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
              >> at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
              >> at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
              >> at weblogic.Server.main(Server.java:31)
              >> Reason: Fatal initialization exception
              >> Throwable: java.lang.SecurityException: Authentication for user system
              >denied
              >> java.lang.SecurityException: Authentication for user system denied
              >> at
              >weblogic.security.service.SecurityServiceManager.doBootAuthorization(
              >> SecurityServiceManager.java:978)
              >> at
              >weblogic.security.service.SecurityServiceManager.initialize(SecurityS
              >> erviceManager.java:1116)
              >> at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
              >> at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
              >> at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
              >> at weblogic.Server.main(Server.java:31)
              >>
              >> Thanks.
              >
              >
              

  • How to start WAD report from MSS with Hierarchy ?

    Hello to all.
    I have a WAD Report that the parameters for it are: Org  unit - as the root, and a year/month.
    The report receive an org unit and display data for it and for all org units under it in the Org. structure.
    I start the report from the MSS.
    In R/3 in table T77MWBBWS I created an entry for that report with Reference char. = "ORG_STRU" instead of "0orgunit".
    The report ignores the Org unit that I choose from the MSS selection screen, and starts with the Root Org unit of my Org structure.
    What to do in order to start the report with the Org unit that i select and to get results for all the org. units under it ?
    Thanks, Pazit Atar.

    I am also facing same problem.
    I want to know how the org unit which is selected on MSS screen is passed to backend R/3 report (which is using PNP logical db)
    PLEASE HELP.

  • How to start a selection from an exact time of the clip?

    Hello,
    I'm a new user of iMovie '08 and I'd like to know how to start the selection of a part of a clip from an exact point.
    Let me explain (I'm not english, so I hope everyone understands) :
    Let's say I have one clip that lasts 1h20' ok? I remember that at 9'20'' there's a scene I want to catch. And It's very important to be at 9'20'' because there's a peculiar frame I want.
    Let's also say that my problem is not about a single point, but a lot of them. I wrote down (as an example) these parts I want.
    9'20''
    15'10''
    36'00''
    ok?
    How do I place myself in that part of the clip? I don't want to look at the scene since I don't remember it well (I wrote down the minutes since I short in memory).
    I hope this is possible. Thank you very much for your help

    QuickTime Player Pro (a $30 upgrade of QuickTime Player, available from Apple) lets you do exactly what you want to do. It lets you select a chunk of any movie using one of three time formats (one is min:sec:frames). You can Copy that chunk and Paste it into a new movie. In other words, it lets you extract just the frames you want that go in a new movie that you save as a standalone movie.
    To use the new movie you would drop it in the iMovie Events folder. (Or more likely, create a new folder in the iMovie Events folder where you drop all your chunk movies.)
    When you next launch iMovie it will generate thumbails for each of your chunk movies. Now you can use them in iMovie 7 like any other import.
    If you have iMovie 6 you can also do it there, for it shows you the min:sec:frames of your one long clip. To use any chunk elsewhere, you would use iMovie 6 to split the clip, then use the Share selected clip only checkbox in the export dialog window to export each chunk to a Full Quality DV movie.
    Karl

  • How to start a browser from within a java program?

    I want to make a help file for my java program and want to run the browser from the menu of my program.
    How can I start my browser from my program?
    A small code will be helpful.
    Thanks.
    Niteen

    This should work on Windows without having to know where the browser is located. See http://www.javaworld.com/javaworld/javatips/jw-javatip66.html for more details
      public static void viewHtml(URL url, boolean fixHtmlExtension){
          String cmd = "rundll32 url.dll,FileProtocolHandler " + url.toExternalForm();
          if (fixHtmlExtension){
            //There is a bug in rundll32. For http requests, it doesn't like .html or .htm extensions,
            //but replacing the 'm' with '%6D' works. 
            //This fix is not needed for file requests.
            if (cmd.endsWith(".htm")){
              cmd = cmd.substring(0,cmd.length()-1) + "%6D";
            else if (cmd.endsWith(".html")){
              cmd = cmd.substring(0,cmd.length()-2) + "%6Dl";
          Process process = Runtime.getRuntime().exec(cmd);
          try{
            process.waitFor();
          catch(InterruptedException e){

  • Multiple keyboard layouts... how do I stop it from defaulting to QWERTY?

    I've been working on teaching myself the Dvorak layout. I've even re-arranged the keys on my laptop (which is partly because I LOVE to see people who can't touch-type struggle >:)
    Unfortunately... the OS seems DETERMINED to use the QWERTY layout. Every time I switch apps, it goes back to qwerty as default... and I see no option anywhere to stop this. I could probably remove qwerty layout from the menu... but as I'm learning, this isn't exactly an option. And it's something that should be changeable.
    Is there a way to stop this defaulting behavior, so if I set it to a different layout it'll STAY that way? I'm also working with a few Japanese sets, and it has the same irritating habit, so I can't quickly switch between apps.
    If it remembered what setting that application had, I'd be even happier... but again, I can't find anything to effect this in the least.

    Look, dude, if you've already thought of this, too, then spare me the sarcasm, ignore it and continue waiting for something better to come along.
    But, since no one's been able to help you so far, notwithstanding your pleasant and welcoming demeanor, have you tried the following:
    Select both Dvorak and Qwerty (and whatever else you want) from the input sources in System Preferences > International > Input menu.
    Then click on the Keyboard Shortcuts button, which will take you to the Keyboard Shortcuts section of the Keyboard & Mouse pane.
    Click the black triangle next to "input menu," check the boxes next to "select previous input source" and "select next input source in input menu," and set up easy to remember short cuts for switching back and forth between keyboard layouts. (If you see a yellow triangle next to the shortcuts, you'll have to change the default shortcut to something not already used by an application.)
    Now, before you unload another barrel of sarcasm and urge me to read your post again, please know that I fully realize the foregoing workaround does not do exactly what you want to do, i.e., stop your keyboard from defaulting to Qwerty when you switch applications.
    But, what it does let you do is, when you switch apps. and your keyboard defaults back to Qwerty, then you can easily, with a keystroke or two, switch back the your preferred method of input without having to go to System Preferences and check and uncheck boxes.
    That's the best I've got on this one. If you don't like it for any reason -- such as the keystroke or two being too much work for you -- or for no reason at all for that matter, don't bother letting me know. If you do like it and it works for you, well that's great and that's why I posted.
    Good luck.
    -- JDee

  • How to start sql server from cmd

    
     i am starting sql server from command prompt but i get error message as under :
    2014-04-04 23:41:55.90 Server      Error: 17058, Severity: 16, State: 1.
    2014-04-04 23:41:55.90 Server      initerrlog: Could not open error log file ''.
     Operating system error = 3(failed to retrieve text for this error. Reason: 1510
    5).
    2014-04-04 23:41:56.21 Server      Error: 17058, Severity: 16, State: 1.
    2014-04-04 23:41:56.21 Server      initerrlog: Could not open error log file ''.
     Operating system error = 3(failed to retrieve text for this error. Reason: 1510
    5).
    2014-04-04 23:41:56.50 Server      Error: 17058, Severity: 16, State: 1.
    2014-04-04 23:41:56.50 Server      initerrlog: Could not open error log file ''.
     Operating system error = 3(failed to retrieve text for this error. Reason: 1510
    5).
    2014-04-04 23:41:56.80 Server      Error: 17058, Severity: 16, State: 1.
    2014-04-04 23:41:56.80 Server      initerrlog: Could not open error log file ''.
     Operating system error = 3(failed to retrieve text for this error. Reason: 1510
    5).
    2014-04-04 23:41:57.10 Server      Error: 17058, Severity: 16, State: 1.
    2014-04-04 23:41:57.10 Server      initerrlog: Could not open error log file ''.
     Operating system error = 3(failed to retrieve text for this error. Reason: 1510
    5).
    2014-04-04 23:41:57.41 Server      Error: 17058, Severity: 16, State: 1.
    2014-04-04 23:41:57.41 Server      initerrlog: Could not open error log file ''.
     Operating system error = 3(failed to retrieve text for this error. Reason: 1510
    5).

    Hi,
    I agree with Erland. You need to verify and specify the correct path for the error log in Startup parameters.
    For example: -eC:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG
    To configure startup options
    1.In SQL Server Configuration Manager, click SQL Server Services.
    2.In the right pane, right-click SQL Server (<instance_name>), and then click Properties.
    3.On the Startup Parameters tab, in the Specify a startup parameter box, type the parameter, and then click Add.
    For example, to start in single-user mode, type -m in the Specify a startup parameter box and then click Add. (When you restart SQL Server in single-user mode, stop the SQL Server Agent. Otherwise, SQL Server Agent might connect first and prevent you from
    connecting as a second user.)
    4. Click OK.
    5.Restart the Database Engine.
    For more information, please see:
    Configure Server Startup Options (SQL Server Configuration Manager)
    http://technet.microsoft.com/en-us/library/ms345416.aspx
    Database Engine Service Startup Options
    http://technet.microsoft.com/en-us/library/ms190737.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • How to start iPhoto mavericks from a particular photo (not from the beginning)

    In my previous versions of iphoto I could start the slideshow from any photo, after highlighting it first. Now, I can start it only from the beginning and only if  I did not highlight any photo in the albom. If I highlight a photo and then click on ``slideshow'', it will show me this particular photo but will not play after that (even if use settings). Can I do anything about it?
    My alboms are long, so to start them each time from the beginning is very inconvenient.

    There's a bug with iPhoto 9.5.1 and Mavericks in that slidshows from albums only play correctly, i.e. from the first slide, with the photos sorted by date, keyword, rating or title. When sorted manually the slideshow can start5  from any seemingly random photo. 
    Send a bug report to Apple via http://www.apple.com/feedback/iphoto.html
    OT

  • How do I keep iTunes from defaulting to Airplay

    I have iTunes 11.1.3 on my MacBook Mavericks.  I also have AppleTV and I sometime turn on Airplay to watch something I can get on my computer but not through iTunes or any of the subscription services I use.  The poblem is that when I forget to disable Airplay on my AppleTV unit, iTunes defaults to wanting to play everything over Airplay.  Then I have to go out into the other room and turn everythinh on just so that I can turn Airplay off.  Is there a way to invert iTunes default behavior so that if Airplay is active on AppleTV, I still have to explicitly tell iTunes to use it rather that diplaying on my computer screen?
    Thanks,
    Rob

    Posting just a question mark, which was all that was contained in your post subject line and body when I replied, did indeed stump me, as it would have anyone without psychic powers.  Now that you've posted an actual question, someone may be able to help you.

  • IPod shuffle 4th Gen. How to start playing podcast from the very beginning once again?

        Hello to everybody in this forum,
    I bought a new iPod shuffle 4th Gen music player for about two weeks ago. I love this device, it works great as well as it's sound quality amazes me after Windows Mobile 6.0 Phone, Transcend MP3 and even Samsung Galaxy Ace devices use experience. It's much better and it made me got used to podcasts feature I never tried before, But if I want to replay the very same podcast item from the very beginning - I simply don't know how to rewind it back. If I press next/prev buttons it doesn't help. The podcast itself starts to play at about 5 minutes before a podcast's end as if I were listened to the whole podcast continuously from the beginning of a podcast. A podcast appears to be divided into chapters and I don't understand how to switch chaprers. Even if I did, the amount of chapters is big and it's inconvenient to swith every chapter with prev button pressed. Shuffle's manual tells me nothing on how to get things work I want it to. Any help is appreciated.
    Best regards, Alexander Chernyaev.

        Hello to everybody in this forum,
    I bought a new iPod shuffle 4th Gen music player for about two weeks ago. I love this device, it works great as well as it's sound quality amazes me after Windows Mobile 6.0 Phone, Transcend MP3 and even Samsung Galaxy Ace devices use experience. It's much better and it made me got used to podcasts feature I never tried before, But if I want to replay the very same podcast item from the very beginning - I simply don't know how to rewind it back. If I press next/prev buttons it doesn't help. The podcast itself starts to play at about 5 minutes before a podcast's end as if I were listened to the whole podcast continuously from the beginning of a podcast. A podcast appears to be divided into chapters and I don't understand how to switch chaprers. Even if I did, the amount of chapters is big and it's inconvenient to swith every chapter with prev button pressed. Shuffle's manual tells me nothing on how to get things work I want it to. Any help is appreciated.
    Best regards, Alexander Chernyaev.

  • How To Stop Iphone 5S From Defaulting To Photo Mode

    The default mode for the camera is Photo.  Is there anyway to keep it locked on another mode?  I would like to keep it locked on the Video mode for instance, but after 5 or 10 minutes it automatically defaults back to the Photo mode.  So if I'm not paying attention I think I'm taking a video, and it turns out it is a photo.  It is very frustrating.

    I am trying this on my phone. I opened the camera and set it for video recording. I then tapped the home button to exit the camera. I waited about 5 minutes, opened the camera again and it was still on video mode. So, I cannot offer any suggestions at this time. Watch closely again to see how your camera happens to change modes without any input from you and post back any update.

  • How to Start EDI Batch from API

    Hi,
    I'm creating EDI batch configuration dynamically through API (using TpmContext object), but could not find a method which can start a newly created batch.
    from the UI, newly created batch is visible at Parties > Agreement > A->B > Batch Configuration as
    test2, but it is not activated. how can I start it through code?
    Usman Shaheen MCTS BizTalk Server http://usmanshaheen.wordpress.com

    Thank you boatseller.
    following SQL insert start the newly created batch
     INSERT INTO [BizTalkMgmtDb].[dbo].[PAM_Control]
               ([EdiMessageType]
               ,[ActionType]
               ,[ActionDateTime]
               ,[UsedOnce]
               ,[BatchId]
               ,[BatchName]
               ,[SenderPartyName], ReceiverPartyName, AgreementName)
    SELECT 0 as EDIMessageType
          ,'EdiBatchActivate' as 'ActionType'
          ,GetDate() as 'ActionDateTime'
          ,0 as 'UsedOnce'
          ,4 as [BatchId]
          ,'test2' as [BatchName], 'Sender', 'Receiver', 'agr_name' as agreementName
    Usman Shaheen MCTS BizTalk Server http://usmanshaheen.wordpress.com

Maybe you are looking for

  • Authorization error when running a report from the portal

    Hello, I am trying to run a certain report under a certain user in the portal. If I run this report with this user from the BW it is working but if I run it from the portal with this user it doesn't. The error I receive in the portal is this: ABEND:

  • Oracle Spatial & Fusion MiddleWare MapViewer at Oracle OpenWorld

    If you happen to be attended OOW next week you will see a very large presence for our products. hands on labs, sessions, demos ... Look for us at Business Intelligence,Oracle Utilities, DigitalGlobe, Navteq, KPI Partners, and GE. Hope to meet some of

  • Mount USB/Firewire drive from shell or cron job

    Is there a way to mount a USB/Firewire drive from the shell or possibly mount it using a cron job? Here's the situation. I have a user that keeps all of her data on her desktop or in her Documents folder. I have attached a firewire drive to her Power

  • Edit a dvd

    i filmed a dvd of my kids ball game, now i want to put it on my computer,and edit it. how do i do this

  • Saving file/pictures in PS elements 10

    Hi, Just brought PSE10 issue is when i scan a picture and then edit it i go to save it but there is already a IMG file of the same picture. Every time i scan a picture its like it auto saves a copy in a seperate folder labelled the current days date