Package nextapp.echo2.webcontainer.util

Examples of nextapp.echo2.webcontainer.util.IdTable


    colMain.add(rowButtons);
   
    KeyStrokeListener ks = new KeyStrokeListener();
    ks.addKeyCombination(KeyStrokeListener.VK_INSERT,"INSERT");
    ks.addKeyCombination(KeyStrokeListener.VK_DELETE,"DELETE");
    ks.addActionListener(new ActionListener() {

      private static final long serialVersionUID = 1L;

      public void actionPerformed(ActionEvent arg0) {
        if (arg0.getActionCommand().equals("INSERT"))
View Full Code Here


        groupEditor = new GroupEditor();
        cbbMainGroup = new GroupCombo();
        companyEditor = new CompanyEditor();

        btnAddGroup = new JbsButton("+");
        btnAddGroup.addActionListener(new ActionListener() {

            private static final long serialVersionUID = 1L;

            public void actionPerformed(ActionEvent arg0) {
                FmJbsBaseObjectList fmSelectGroup = new FmJbsBaseObjectList(JbsL10N.getString("JbsUserGroup.selectGroup"));
                PnUserGroupList pnUserGroupList = new PnUserGroupList();
                pnUserGroupList.setToolPaneVisible(ClientGlobals.getUser().isRoot());
                fmSelectGroup.setPnList(pnUserGroupList);
                fmSelectGroup.showForm();
                fmSelectGroup.addActionListener(new ActionListener() {

                    private static final long serialVersionUID = 1L;

                    public void actionPerformed(ActionEvent arg0) {
                        System.out.println(arg0.getActionCommand());
View Full Code Here

        this.txEmail = new JbsTextField();
        this.txWebsite = new JbsTextField();

        this.usCompanyLogo = new JbsUploadSelect();
        try {
            this.usCompanyLogo.addUploadListener(new UploadListener() {

                public void fileUpload(UploadEvent e) {
                    uploadImage(e);
                }
View Full Code Here

        this.addControl(groupName, groupName, control);
    }

    public void addSeparator(String groupName) {
        Row row = new Row();
        ColumnLayoutData layout = new ColumnLayoutData();
        layout.setHeight(new JbsExtent(15, JbsExtent.PX));
        row.setLayoutData(layout);
        this.addControl(groupName, row);
    }
View Full Code Here

        colMain.add(label);
    }
   
    public void addBlankLine() {
        Row row = new Row();
        ColumnLayoutData layout = new ColumnLayoutData();
        layout.setHeight(new JbsExtent(15,JbsExtent.PX));
        row.setLayoutData(layout);
        colMain.add(row);
    }
View Full Code Here

                    break;
                default :
                    align = Alignment.LEFT;
            }
           
            TableLayoutData layoutData = (TableLayoutData)((Label)component).getLayoutData();
            layoutData.setAlignment(new Alignment(align, Alignment.CENTER));
            ((Label)component).setLayoutData(layoutData);
        }
        return component;
    }
View Full Code Here

        //If nor group is found then create a new one:
        if (newColumn == null) {
            newColumn = new Column();
            newColumn.setId(groupName);
            newColumn.setStyleName("Default");
            AccordionPaneLayoutData layoutData = new AccordionPaneLayoutData();
            layoutData.setTitle(groupTitle);
            newColumn.setLayoutData(layoutData);
            this.add(newColumn);
        }
        return newColumn;
    }
View Full Code Here

     * <code>System.gc()</code> actually causing weak references to
     * be collected.  It is not technically safe to rely on this,
     * thus this test may randomly fail.
     */
    public void testReferenceRelease() {
        IdTable idManager = new IdTable();
        TestObject testObject = new TestObject();
        String id = testObject.getRenderId();
        idManager.register(testObject);
        assertNotNull(idManager.getObject(id));
       
        testObject = null;
        for (int i = 0; i < 10; ++i) {
            System.gc();
        }
       
        assertNull(idManager.getObject(id));
    }
View Full Code Here

    /**
     * Tests serialization of an <code>IdTable</code>.
     */
    public void testSerialization()
    throws Exception {
        IdTable idTable = new IdTable();
        TestObject testObject = new TestObject();
        String id = testObject.getRenderId();
        idTable.register(testObject);
       
        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
        ObjectOutputStream objectOut = new ObjectOutputStream(byteOut);
        objectOut.writeObject(idTable);
        objectOut.close();
       
        byte[] data = byteOut.toByteArray();
       
        ByteArrayInputStream byteIn = new ByteArrayInputStream(data);
        ObjectInputStream objectIn = new ObjectInputStream(byteIn);
        IdTable newIdTable = (IdTable) objectIn.readObject();
        TestObject newTestObject = (TestObject) newIdTable.getObject(id);
        assertEquals(id, newTestObject.getRenderId());
        objectIn.close();
       
        testObject = null;
        for (int i = 0; i < 10; ++i) {
            System.gc();
        }
       
        assertNull(idTable.getObject(id));
        assertNotNull(newIdTable.getObject(id));
       
        newTestObject = null;
        for (int i = 0; i < 10; ++i) {
            System.gc();
        }

        assertNull(newIdTable.getObject(id));
    }
View Full Code Here

     *
     * @return the <code>IdTable</code>
     */
    public IdTable getIdTable() {
        if (idTable == null) {
            idTable = new IdTable();
        }
        return idTable;
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.webcontainer.util.IdTable

Copyright © 2018 www.massapicom. 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.