Examples of FrameWrapper


Examples of com.intellij.openapi.ui.FrameWrapper

            }
        }.queue();
    }

    private void showProperties(Project project, Revision revision, SVNProperties result) {
        FrameWrapper fw = new FrameWrapper(null, "SvnRevisionGraphPlugin.svnPropertiesDimensions");
        fw.setTitle(" SVN properties: " + revision);
        try {
            fw.setImage(ImageIO.read(getClass().getResource("/icons/show_props.png")));
        } catch (IOException e) {
            log.error("Error loading icon", e);
        }
        fw.setProject(project);
        PropertiesComponent propertiesComponent = new PropertiesComponent();
        fw.setComponent(propertiesComponent);
        fw.show();
        propertiesComponent.setData(result);
    }
View Full Code Here

Examples of com.intellij.openapi.ui.FrameWrapper

            }.registerCustomShortcutSet(new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts("CloseContent")),
                    diffPanel.getComponent());
            showDiffDialog(builder, hints);
        }
        else {
            final FrameWrapper frameWrapper = new FrameWrapper(request.getProject(), request.getGroupKey());
            DiffPanelImpl diffPanel = createDiffPanelIfShouldShow(request, frameWrapper.getFrame(), frameWrapper, true);
            if (diffPanel == null) {
                Disposer.dispose(frameWrapper);
                return;
            }
            if (hints.contains(DiffTool.HINT_DIFF_IS_APPROXIMATE)) {
                diffPanel.setPatchAppliedApproximately();
            }
            frameWrapper.setTitle(request.getWindowTitle());
            DiffUtil.initDiffFrame(diffPanel.getProject(), frameWrapper, diffPanel, diffPanel.getComponent());

            new AnAction() {
                public void actionPerformed(final AnActionEvent e) {
                    frameWrapper.getFrame().dispose();
                }
            }.registerCustomShortcutSet(new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts("CloseContent")),
                    diffPanel.getComponent());

            frameWrapper.show();
        }
    }
View Full Code Here

Examples of org.jsynthlib.core.TitleFinder.FrameWrapper

    public void testDeleteDups() throws InterruptedException {
        Pattern pattern =
                Pattern.compile("(\\d+) Patches and Scenes were deleted");
        guiHandler.installDevice("Roland", "Roland D-50");

        FrameWrapper library = guiHandler.openLibrary();
        JTableFixture table = library.table();
        Thread.sleep(100);

        guiHandler.newPatch(library, "Roland D-50", D50SingleDriver.class,
                listener);
        String[][] contents = table.contents();
        int rows = contents.length;
        assertEquals(1, rows);

        JMenuItemFixture menuItem =
                testFrame.menuItem(new GenericTypeMatcher<JMenuItem>(
                        JMenuItem.class) {

                    @Override
                    protected boolean isMatching(JMenuItem component) {
                        return component.getActionCommand().equals(
                                "Delete Dups...");
                    }
                });
        assertFalse(menuItem.target.isEnabled());

        guiHandler.newPatch(library, "Roland D-50", D50SingleDriver.class,
                listener);
        contents = table.contents();
        rows = contents.length;
        assertEquals(2, rows);

        String deleteDups = guiHandler.deleteDups();
        Matcher matcher = pattern.matcher(deleteDups);
        assertTrue(matcher.find());
        int numDeleted = Integer.parseInt(matcher.group(1));
        assertEquals(1, numDeleted);
        contents = table.contents();
        rows = contents.length;
        assertEquals(1, rows);

        guiHandler.newPatch(library, "Roland D-50", D50SingleDriver.class,
                listener);
        contents = table.contents();
        rows = contents.length;
        assertEquals(2, rows);

        FrameWrapper patchEditor =
                guiHandler.openPatchEditor(table, -1, 0, listener, false);

        List<SysexWidget> sysexWidgets =
                SysexWidgetFinder.findSysexWidgets(patchEditor);
        int numEditedParams = 0;
View Full Code Here

Examples of org.jsynthlib.core.TitleFinder.FrameWrapper

        guiHandler.installDevice("Roland", "Roland D-50");
        guiHandler.installDevice("Roland", "Roland D-10");
        guiHandler.installDevice("Yamaha", "Yamaha DX7");

        FrameWrapper library = guiHandler.openLibrary();
        Thread.sleep(100);

        guiHandler.newPatch(library, "Roland D-50", D50SingleDriver.class,
                listener);
        guiHandler.newPatch(library, "Roland D-10", RolandD10ToneDriver.class,
                listener);
        guiHandler.newPatch(library, "Yamaha DX7",
                YamahaDX7VoiceSingleDriver.class, listener);

        guiHandler.saveLibrary(patchTestFolder, "testSaveAndOpenLibrary");

        assertTrue("Patchlib exists", patchlib.exists());
        assertTrue("Patchlib is file", patchlib.isFile());
        assertTrue("XML exists", xml.exists());
        assertTrue("XML is file", xml.isFile());

        guiHandler.closeLibrary(library);

        FrameWrapper library2 = guiHandler.openLibrary(patchlib);
        JTableFixture table = library2.table();

        String[][] contents = table.contents();
        assertEquals("Check table size", 3, contents.length);
        TableCell tableCell = TableCell.row(0).column(0);
        table.cell(tableCell).requireValue("D-50");
View Full Code Here

Examples of org.jsynthlib.core.TitleFinder.FrameWrapper

        deleteFileIfExists(xml);

        guiHandler.installDevice("Roland", "Roland D-50");
        guiHandler.installDevice("Yamaha", "Yamaha DX7");

        FrameWrapper library = guiHandler.openLibrary();
        Thread.sleep(100);

        guiHandler.newPatch(library, "Roland D-50", D50SingleDriver.class,
                listener);
        guiHandler.newPatch(library, "Yamaha DX7",
                YamahaDX7VoiceSingleDriver.class, listener);

        guiHandler.addPatchMetaData(library, 0, GuiHandler.FIELD1, rolandData1);
        guiHandler.addPatchMetaData(library, 0, GuiHandler.FIELD2, rolandData2);
        guiHandler.addPatchMetaData(library, 0, GuiHandler.COMMENT,
                rolandComment);

        guiHandler.addPatchMetaData(library, 1, GuiHandler.FIELD1, yamahaData1);
        guiHandler.addPatchMetaData(library, 1, GuiHandler.FIELD2, yamahaData2);
        guiHandler.addPatchMetaData(library, 1, GuiHandler.COMMENT,
                yamahaComment);

        guiHandler.saveLibrary(patchTestFolder,
                "testSaveAndOpenLibraryWithMetadata");

        assertTrue("Patchlib exists", patchlib.exists());
        assertTrue("Patchlib is file", patchlib.isFile());
        assertTrue("XML exists", xml.exists());
        assertTrue("XML is file", xml.isFile());

        guiHandler.closeLibrary(library);

        FrameWrapper library2 = guiHandler.openLibrary(patchlib);
        JTableFixture table = library2.table();

        String[][] contents = table.contents();
        assertEquals("Check table size", 2, contents.length);
        table.cell(TableCell.row(0).column(0)).requireValue("D-50");
        table.cell(TableCell.row(0).column(3)).requireValue(rolandData1);
View Full Code Here

Examples of org.jsynthlib.core.TitleFinder.FrameWrapper

    @Test
    public void testCutCopyPasteBetweenLibraries() throws InterruptedException {
        guiHandler.installDevice("Roland", "Roland D-50");
        guiHandler.installDevice("Yamaha", "Yamaha DX7");

        FrameWrapper library = guiHandler.openLibrary();
        JTableFixture table = library.table();
        Thread.sleep(100);

        guiHandler.newPatch(library, "Roland D-50", D50SingleDriver.class,
                listener);
        guiHandler.newPatch(library, "Yamaha DX7",
                YamahaDX7VoiceSingleDriver.class, listener);

        FrameWrapper library2 = guiHandler.openLibrary();
        JTableFixture table2 = library2.table();

        assertEquals(2, table.contents().length);
        assertEquals(0, table2.contents().length);

        guiHandler.cutCopyPastePatch(library, 0, 0, library2, false);
View Full Code Here

Examples of org.jsynthlib.core.TitleFinder.FrameWrapper

    @Test
    public void testCutCopyPasteBetweenBanks() throws InterruptedException {
        guiHandler.installDevice("Yamaha", "Yamaha DX7");

        FrameWrapper library = guiHandler.openLibrary();
        JTableFixture table = library.table();
        Thread.sleep(100);

        guiHandler.newPatch(library, "Yamaha DX7",
                YamahaDX7VoiceBankDriver.class, listener);
        FrameWrapper bank1 =
                guiHandler.openPatchEditor(table, -1, 0, listener, false);
        guiHandler.setPatchName(bank1, 0, 0, "test");
        guiHandler.setPatchName(bank1, 0, 1, "test2");
        bank1.table().cell(TableCell.row(0).column(0))
                .requireValue(Pattern.compile("01 test\\s+"));

        guiHandler.newPatch(library, "Yamaha DX7",
                YamahaDX7VoiceBankDriver.class, listener);
        FrameWrapper bank2 =
                guiHandler.openPatchEditor(table, -1, 0, listener, false);

        guiHandler.cutCopyPastePatch(bank1, 0, 0, bank2, false);

        bank1.table().cell(TableCell.row(0).column(0))
                .requireValue(Pattern.compile("01\\s+"));
        bank2.table().cell(TableCell.row(0).column(0))
                .requireValue(Pattern.compile("01 test\\s+"));

        guiHandler.cutCopyPastePatch(bank1, 0, 1, bank2, true);

        bank1.table().cell(TableCell.row(0).column(1))
                .requireValue(Pattern.compile("09 test2\\s+"));
        bank2.table().cell(TableCell.row(0).column(1))
                .requireValue(Pattern.compile("09 test2\\s+"));

        guiHandler.closeFrame(bank1, false);
        guiHandler.closeFrame(bank2, false);
        guiHandler.closeLibrary(library);
View Full Code Here

Examples of org.jsynthlib.core.TitleFinder.FrameWrapper

    @Test
    public void testDragNDropBetweenBanks() throws InterruptedException {
        guiHandler.installDevice("Yamaha", "Yamaha DX7");

        FrameWrapper library = guiHandler.openLibrary();
        JTableFixture table = library.table();
        Thread.sleep(100);

        guiHandler.newPatch(library, "Yamaha DX7",
                YamahaDX7VoiceBankDriver.class, listener);
        FrameWrapper bank1 =
                guiHandler.openPatchEditor(table, -1, 0, listener, false);
        guiHandler.setPatchName(bank1, 0, 0, "test");
        guiHandler.setPatchName(bank1, 0, 1, "test2");
        bank1.table().cell(TableCell.row(0).column(0))
                .requireValue(Pattern.compile("01 test\\s+"));

        guiHandler.dragNdropPatch(bank1, 0, 0, 1, 1);

        bank1.table().cell(TableCell.row(0).column(0))
                .requireValue(Pattern.compile("01 test\\s+"));
        bank1.table().cell(TableCell.row(1).column(1))
                .requireValue(Pattern.compile("\\d+ test\\s+"));

        guiHandler.closeFrame(bank1, false);
        guiHandler.closeLibrary(library);
        guiHandler.uninstallDevice(null);
View Full Code Here

Examples of org.jsynthlib.core.TitleFinder.FrameWrapper

        String yamahaData1 = "Yamaha Data1";

        guiHandler.installDevice("Roland", "Roland D-50");
        guiHandler.installDevice("Yamaha", "Yamaha DX7");

        FrameWrapper library = guiHandler.openLibrary();
        JTableFixture table = library.table();
        Thread.sleep(100);

        guiHandler.newPatch(library, "Roland D-50", D50SingleDriver.class,
                listener);
        guiHandler.newPatch(library, "Yamaha DX7",
View Full Code Here

Examples of org.jsynthlib.core.TitleFinder.FrameWrapper

        String yamahaData1 = "Yamaha Data1";

        guiHandler.installDevice("Roland", "Roland D-50");
        guiHandler.installDevice("Yamaha", "Yamaha DX7");

        FrameWrapper library = guiHandler.openLibrary();
        JTableFixture table = library.table();
        Thread.sleep(100);

        guiHandler.newPatch(library, "Roland D-50", D50SingleDriver.class,
                listener);
        guiHandler.newPatch(library, "Yamaha DX7",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.