Java Code Examples for java.beans.PropertyVetoException#printStackTrace()

The following examples show how to use java.beans.PropertyVetoException#printStackTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PhadhailViews.java    From netbeans with Apache License 2.0 6 votes vote down vote up
private static Component nodeBasedView(Node root) {
    Node root2;
    if (Children.MUTEX == Mutex.EVENT) {
        // #35833 branch.
        root2 = root;
    } else {
        root2 = new EQReplannedNode(root);
    }
    ExpPanel p = new ExpPanel();
    p.setLayout(new BorderLayout());
    JComponent tree = new BeanTreeView();
    p.add(tree, BorderLayout.CENTER);
    p.getExplorerManager().setRootContext(root2);
    try {
        p.getExplorerManager().setSelectedNodes(new Node[] {root2});
    } catch (PropertyVetoException pve) {
        pve.printStackTrace();
    }
    Object key = "org.openide.actions.PopupAction";
    KeyStroke ks = KeyStroke.getKeyStroke("shift F10");
    tree.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(ks, key);
    return p;
}
 
Example 2
Source File: BrokenDataShadow.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void refresh() {
    try {
        if (URLMapper.findFileObject(getUrl()) != null) {
            /* Link to original file was repaired */
            this.setValid(false);
        }
    } catch (PropertyVetoException e) {
        e.printStackTrace();
    }
}
 
Example 3
Source File: ConnectionPoolManager.java    From ezScrum with GNU General Public License v2.0 5 votes vote down vote up
private DataSource createDataSource(String driverClass, String url, String account, String password) {
	ComboPooledDataSource dataSource = new ComboPooledDataSource();
	try {
		dataSource.setDriverClass(driverClass);
		dataSource.setJdbcUrl(url);
		dataSource.setUser(account);
		dataSource.setPassword(password);

		dataSource.setMinPoolSize(10);
		dataSource.setMaxPoolSize(35);
		dataSource.setAcquireIncrement(0);
		dataSource.setMaxStatements(0);
		
		/** 最大允許的閒置時間(秒) */
		dataSource.setMaxIdleTime(300);
		/** 對閒置的連線進行Query測試設置(秒) */
		dataSource.setIdleConnectionTestPeriod(1800);
		
		/** Checkin connection時不檢查連線是否有效 */
		dataSource.setTestConnectionOnCheckin(false);
		/** Checkout connection時檢查連線的有效性*/
		dataSource.setTestConnectionOnCheckout(true);
		/** 進行test時使用的 Query設定*/
		dataSource.setPreferredTestQuery("SELECT 1;");
		/** Connection的最大有效時數(秒)*/
		dataSource.setMaxConnectionAge(28800);
		/** Connection checkout 之後的有效時數(毫秒)*/
		dataSource.setCheckoutTimeout(28800000);
	} catch (PropertyVetoException e) {
		e.printStackTrace();
	}
	mPoolMap.put(url, dataSource);
	return dataSource;
}
 
Example 4
Source File: IDEInitializer.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public MyFileSystem (FileSystem[] fileSystems) {
    super (fileSystems);
    try {
        setSystemName ("TestFS");
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }
}
 
Example 5
Source File: IDEInitializer.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public MyFileSystem (FileSystem[] fileSystems) {
    super (fileSystems);
    try {
        setSystemName ("TestFS");
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }
}
 
Example 6
Source File: bug6647340.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void setIcon(boolean b) {
    try {
        jif.setIcon(b);
    } catch (PropertyVetoException e) {
        e.printStackTrace();
    }
}
 
Example 7
Source File: bug6647340.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void setIcon(boolean b) {
    try {
        jif.setIcon(b);
    } catch (PropertyVetoException e) {
        e.printStackTrace();
    }
}
 
Example 8
Source File: bug6647340.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void setIcon(boolean b) {
    try {
        jif.setIcon(b);
    } catch (PropertyVetoException e) {
        e.printStackTrace();
    }
}
 
Example 9
Source File: MemoryFileSystem.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/** Creates new MemoryFS */
public MemoryFileSystem() {
    attr = this;
    list = this;
    change = this;
    info = this;

    
    try {
        _setSystemName("MemoryFileSystem" + String.valueOf(id));
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }
}
 
Example 10
Source File: IDEInitializer.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("deprecation")
public MyFileSystem (FileSystem[] fileSystems) {
    super (fileSystems);
    try {
        setSystemName ("TestFS");
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }
}
 
Example 11
Source File: MainFrame.java    From sc2gears with Apache License 2.0 5 votes vote down vote up
/**
 * Selects the specified internal frame. If it is iconified, first it will be de-iconified.
 * @param iframe
 */
private void selectFrame( final JInternalFrame iframe ) {
	try {
		if ( iframe.isIcon() )
			iframe.setIcon( false);
		iframe.setSelected( true );
	} catch ( final PropertyVetoException pve) {
		pve.printStackTrace();
	}
}
 
Example 12
Source File: bug6647340.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void setIcon(boolean b) {
    try {
        jif.setIcon(b);
    } catch (PropertyVetoException e) {
        e.printStackTrace();
    }
}
 
Example 13
Source File: bug6647340.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private void setIcon(boolean b) {
    try {
        jif.setIcon(b);
    } catch (PropertyVetoException e) {
        e.printStackTrace();
    }
}
 
Example 14
Source File: bug6647340.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void setIcon(boolean b) {
    try {
        jif.setIcon(b);
    } catch (PropertyVetoException e) {
        e.printStackTrace();
    }
}
 
Example 15
Source File: NonOpaqueInternalFrame.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private static void init()
{
    String[] instructions =
    {
        "This is an AUTOMATIC test, simply wait until it is done.",
        "The result (passed or failed) will be shown in the",
        "message window below."
    };
    Sysout.createDialog( );
    Sysout.printInstructions( instructions );


    // Create a frame with two non-opaque JInternalFrame's containing
    // heavyweight buttons.
    JFrame jframe = new JFrame("mixing test");
    JDesktopPane desktop = new JDesktopPane();
    jframe.setContentPane(desktop);
    JInternalFrame iframe1 = new JInternalFrame("iframe 1");
    iframe1.setIconifiable(true);
    iframe1.add(new MyButton());
    iframe1.setBounds(10, 10, 100, 100);
    iframe1.setOpaque(false);
    iframe1.setVisible(true);
    desktop.add(iframe1);
    JInternalFrame iframe2 = new JInternalFrame("iframe 2");
    iframe2.setIconifiable(true);
    iframe2.add(new MyButton());
    iframe2.setBounds(50, 50, 100, 100);
    iframe2.setOpaque(false);
    iframe2.setVisible(true);
    desktop.add(iframe2);
    jframe.setSize(300, 300);
    jframe.setVisible(true);

    Robot robot = Util.createRobot();
    robot.setAutoDelay(20);

    Util.waitForIdle(robot);

    // Try selecting the bottommost frame
    try {
        iframe2.setSelected(true);
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }

    // Click the title bar of the internal frame
    Point lLoc = iframe2.getLocationOnScreen();
    System.err.println("lLoc: " + lLoc);
    robot.mouseMove(lLoc.x + 10, lLoc.y + 10);
    Util.waitForIdle(robot);

    robot.mousePress(InputEvent.BUTTON1_MASK);
    robot.mouseRelease(InputEvent.BUTTON1_MASK);
    Util.waitForIdle(robot);


    if (failed) {
        fail("The JInternalFrame is considered non-opaque.");
    } else {
        pass();
    }
}
 
Example 16
Source File: NonOpaqueInternalFrame.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
private static void init()
{
    String[] instructions =
    {
        "This is an AUTOMATIC test, simply wait until it is done.",
        "The result (passed or failed) will be shown in the",
        "message window below."
    };
    Sysout.createDialog( );
    Sysout.printInstructions( instructions );


    // Create a frame with two non-opaque JInternalFrame's containing
    // heavyweight buttons.
    JFrame jframe = new JFrame("mixing test");
    JDesktopPane desktop = new JDesktopPane();
    jframe.setContentPane(desktop);
    JInternalFrame iframe1 = new JInternalFrame("iframe 1");
    iframe1.setIconifiable(true);
    iframe1.add(new MyButton());
    iframe1.setBounds(10, 10, 100, 100);
    iframe1.setOpaque(false);
    iframe1.setVisible(true);
    desktop.add(iframe1);
    JInternalFrame iframe2 = new JInternalFrame("iframe 2");
    iframe2.setIconifiable(true);
    iframe2.add(new MyButton());
    iframe2.setBounds(50, 50, 100, 100);
    iframe2.setOpaque(false);
    iframe2.setVisible(true);
    desktop.add(iframe2);
    jframe.setSize(300, 300);
    jframe.setVisible(true);

    Robot robot = Util.createRobot();
    robot.setAutoDelay(20);

    Util.waitForIdle(robot);

    // Try selecting the bottommost frame
    try {
        iframe2.setSelected(true);
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }

    // Click the title bar of the internal frame
    Point lLoc = iframe2.getLocationOnScreen();
    System.err.println("lLoc: " + lLoc);
    robot.mouseMove(lLoc.x + 10, lLoc.y + 10);
    Util.waitForIdle(robot);

    robot.mousePress(InputEvent.BUTTON1_MASK);
    robot.mouseRelease(InputEvent.BUTTON1_MASK);
    Util.waitForIdle(robot);


    if (failed) {
        fail("The JInternalFrame is considered non-opaque.");
    } else {
        pass();
    }
}
 
Example 17
Source File: NonOpaqueInternalFrame.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
private static void init()
{
    String[] instructions =
    {
        "This is an AUTOMATIC test, simply wait until it is done.",
        "The result (passed or failed) will be shown in the",
        "message window below."
    };
    Sysout.createDialog( );
    Sysout.printInstructions( instructions );


    // Create a frame with two non-opaque JInternalFrame's containing
    // heavyweight buttons.
    JFrame jframe = new JFrame("mixing test");
    JDesktopPane desktop = new JDesktopPane();
    jframe.setContentPane(desktop);
    JInternalFrame iframe1 = new JInternalFrame("iframe 1");
    iframe1.setIconifiable(true);
    iframe1.add(new MyButton());
    iframe1.setBounds(10, 10, 100, 100);
    iframe1.setOpaque(false);
    iframe1.setVisible(true);
    desktop.add(iframe1);
    JInternalFrame iframe2 = new JInternalFrame("iframe 2");
    iframe2.setIconifiable(true);
    iframe2.add(new MyButton());
    iframe2.setBounds(50, 50, 100, 100);
    iframe2.setOpaque(false);
    iframe2.setVisible(true);
    desktop.add(iframe2);
    jframe.setSize(300, 300);
    jframe.setVisible(true);

    Robot robot = Util.createRobot();
    robot.setAutoDelay(20);

    Util.waitForIdle(robot);

    // Try selecting the bottommost frame
    try {
        iframe2.setSelected(true);
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }

    // Click the title bar of the internal frame
    Point lLoc = iframe2.getLocationOnScreen();
    System.err.println("lLoc: " + lLoc);
    robot.mouseMove(lLoc.x + 10, lLoc.y + 10);
    Util.waitForIdle(robot);

    robot.mousePress(InputEvent.BUTTON1_MASK);
    robot.mouseRelease(InputEvent.BUTTON1_MASK);
    Util.waitForIdle(robot);


    if (failed) {
        fail("The JInternalFrame is considered non-opaque.");
    } else {
        pass();
    }
}
 
Example 18
Source File: NonOpaqueInternalFrame.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private static void init()
{
    String[] instructions =
    {
        "This is an AUTOMATIC test, simply wait until it is done.",
        "The result (passed or failed) will be shown in the",
        "message window below."
    };
    Sysout.createDialog( );
    Sysout.printInstructions( instructions );


    // Create a frame with two non-opaque JInternalFrame's containing
    // heavyweight buttons.
    JFrame jframe = new JFrame("mixing test");
    JDesktopPane desktop = new JDesktopPane();
    jframe.setContentPane(desktop);
    JInternalFrame iframe1 = new JInternalFrame("iframe 1");
    iframe1.setIconifiable(true);
    iframe1.add(new MyButton());
    iframe1.setBounds(10, 10, 100, 100);
    iframe1.setOpaque(false);
    iframe1.setVisible(true);
    desktop.add(iframe1);
    JInternalFrame iframe2 = new JInternalFrame("iframe 2");
    iframe2.setIconifiable(true);
    iframe2.add(new MyButton());
    iframe2.setBounds(50, 50, 100, 100);
    iframe2.setOpaque(false);
    iframe2.setVisible(true);
    desktop.add(iframe2);
    jframe.setSize(300, 300);
    jframe.setVisible(true);

    Robot robot = Util.createRobot();
    robot.setAutoDelay(20);

    Util.waitForIdle(robot);

    // Try selecting the bottommost frame
    try {
        iframe2.setSelected(true);
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }

    // Click the title bar of the internal frame
    Point lLoc = iframe2.getLocationOnScreen();
    System.err.println("lLoc: " + lLoc);
    robot.mouseMove(lLoc.x + 10, lLoc.y + 10);
    Util.waitForIdle(robot);

    robot.mousePress(InputEvent.BUTTON1_MASK);
    robot.mouseRelease(InputEvent.BUTTON1_MASK);
    Util.waitForIdle(robot);


    if (failed) {
        fail("The JInternalFrame is considered non-opaque.");
    } else {
        pass();
    }
}
 
Example 19
Source File: NonOpaqueInternalFrame.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private static void init()
{
    String[] instructions =
    {
        "This is an AUTOMATIC test, simply wait until it is done.",
        "The result (passed or failed) will be shown in the",
        "message window below."
    };
    Sysout.createDialog( );
    Sysout.printInstructions( instructions );


    // Create a frame with two non-opaque JInternalFrame's containing
    // heavyweight buttons.
    JFrame jframe = new JFrame("mixing test");
    JDesktopPane desktop = new JDesktopPane();
    jframe.setContentPane(desktop);
    JInternalFrame iframe1 = new JInternalFrame("iframe 1");
    iframe1.setIconifiable(true);
    iframe1.add(new MyButton());
    iframe1.setBounds(10, 10, 100, 100);
    iframe1.setOpaque(false);
    iframe1.setVisible(true);
    desktop.add(iframe1);
    JInternalFrame iframe2 = new JInternalFrame("iframe 2");
    iframe2.setIconifiable(true);
    iframe2.add(new MyButton());
    iframe2.setBounds(50, 50, 100, 100);
    iframe2.setOpaque(false);
    iframe2.setVisible(true);
    desktop.add(iframe2);
    jframe.setSize(300, 300);
    jframe.setVisible(true);

    Robot robot = Util.createRobot();
    robot.setAutoDelay(20);

    Util.waitForIdle(robot);

    // Try selecting the bottommost frame
    try {
        iframe2.setSelected(true);
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }

    // Click the title bar of the internal frame
    Point lLoc = iframe2.getLocationOnScreen();
    System.err.println("lLoc: " + lLoc);
    robot.mouseMove(lLoc.x + 10, lLoc.y + 10);
    Util.waitForIdle(robot);

    robot.mousePress(InputEvent.BUTTON1_MASK);
    robot.mouseRelease(InputEvent.BUTTON1_MASK);
    Util.waitForIdle(robot);


    if (failed) {
        fail("The JInternalFrame is considered non-opaque.");
    } else {
        pass();
    }
}
 
Example 20
Source File: NonOpaqueInternalFrame.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private static void init()
{
    String[] instructions =
    {
        "This is an AUTOMATIC test, simply wait until it is done.",
        "The result (passed or failed) will be shown in the",
        "message window below."
    };
    Sysout.createDialog( );
    Sysout.printInstructions( instructions );


    // Create a frame with two non-opaque JInternalFrame's containing
    // heavyweight buttons.
    JFrame jframe = new JFrame("mixing test");
    JDesktopPane desktop = new JDesktopPane();
    jframe.setContentPane(desktop);
    JInternalFrame iframe1 = new JInternalFrame("iframe 1");
    iframe1.setIconifiable(true);
    iframe1.add(new MyButton());
    iframe1.setBounds(10, 10, 100, 100);
    iframe1.setOpaque(false);
    iframe1.setVisible(true);
    desktop.add(iframe1);
    JInternalFrame iframe2 = new JInternalFrame("iframe 2");
    iframe2.setIconifiable(true);
    iframe2.add(new MyButton());
    iframe2.setBounds(50, 50, 100, 100);
    iframe2.setOpaque(false);
    iframe2.setVisible(true);
    desktop.add(iframe2);
    jframe.setSize(300, 300);
    jframe.setVisible(true);

    Robot robot = Util.createRobot();
    robot.setAutoDelay(20);

    Util.waitForIdle(robot);

    // Try selecting the bottommost frame
    try {
        iframe2.setSelected(true);
    } catch (PropertyVetoException ex) {
        ex.printStackTrace();
    }

    // Click the title bar of the internal frame
    Point lLoc = iframe2.getLocationOnScreen();
    System.err.println("lLoc: " + lLoc);
    robot.mouseMove(lLoc.x + 10, lLoc.y + 10);
    Util.waitForIdle(robot);

    robot.mousePress(InputEvent.BUTTON1_MASK);
    robot.mouseRelease(InputEvent.BUTTON1_MASK);
    Util.waitForIdle(robot);


    if (failed) {
        fail("The JInternalFrame is considered non-opaque.");
    } else {
        pass();
    }
}