Examples of insertByIndex()


Examples of com.sun.star.container.XIndexContainer.insertByIndex()

                                             oObj.getPropertyValue("ImageMap"));
            int previous = imgMap.getCount();
            log.println("Count (previous) " + previous);

            Object im = tEnv.getObjRelation("IMGMAP");
            imgMap.insertByIndex(0, im);
            oObj.setPropertyValue("ImageMap", imgMap);
            imgMap = (XIndexContainer) UnoRuntime.queryInterface(
                             XIndexContainer.class,
                             oObj.getPropertyValue("ImageMap"));
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

                xMenuEntry.setPropertyValue( "Text", new String( "Content" ));
                xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5401" ));
                xMenuEntry.setPropertyValue( "HelpURL", new String( "5401" ));
               
                // insert menu entry to sub menu
                xSubMenuContainer.insertByIndex( 0, (Object)xMenuEntry );
               
                // intialize help/help agent
                // entry "Help Agent"
                xMenuEntry = (XPropertySet)UnoRuntime.queryInterface(
                        XPropertySet.class,
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

                xMenuEntry.setPropertyValue( "Text", new String( "Help Agent" ));
                xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5962" ));
                xMenuEntry.setPropertyValue( "HelpURL", new String( "5962" ));
               
                // insert menu entry to sub menu
                xSubMenuContainer.insertByIndex( 1, (Object)xMenuEntry );
                // intialize help/tips
                // entry "Tips"
                xMenuEntry = (XPropertySet)UnoRuntime.queryInterface(
                        XPropertySet.class,
                        xMenuElementFactory.createInstance("com.sun.star.ui.ActionTrigger" ));
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

                xMenuEntry.setPropertyValue( "Text", new String( "Tips" ));
                xMenuEntry.setPropertyValue( "CommandURL", new String( "slot:5404" ));
                xMenuEntry.setPropertyValue( "HelpURL", new String( "5404" ));
               
                // insert menu entry to sub menu
                xSubMenuContainer.insertByIndex( 2, (Object)xMenuEntry );
               
                // add separator into the given context menu
                xContextMenu.insertByIndex( 1, (Object)xSeparator );
               
                // add new sub menu into the given context menu
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

        prop2[0].Name  = "Horst";
        prop2[0].Value = "BadGuy";

        Type t = xCont.getElementType();
        assertEquals("Initial container is not empty", 0, xCont.getCount());
        xCont.insertByIndex(0, prop1);
        PropertyValue[]ret = (PropertyValue[])xCont.getByIndex(0);
        assertEquals(prop1[0].Name, ret[0].Name);
        assertEquals(prop1[0].Value, ret[0].Value);
        xCont.replaceByIndex(0, prop2);
        ret = (PropertyValue[])xCont.getByIndex(0);
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

        assertEquals(prop2[0].Name, ret[0].Name);
        assertEquals(prop2[0].Value, ret[0].Value);
        xCont.removeByIndex(0);
        assertTrue("Could not remove PropertyValue.",
                   !xCont.hasElements() && xCont.getCount()==0);
        xCont.insertByIndex(0, prop1);
        xCont.insertByIndex(1, prop2);
        assertTrue("Did not insert PropertyValue.",
                   xCont.hasElements() && xCont.getCount()==2);

        try {
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

        assertEquals(prop2[0].Value, ret[0].Value);
        xCont.removeByIndex(0);
        assertTrue("Could not remove PropertyValue.",
                   !xCont.hasElements() && xCont.getCount()==0);
        xCont.insertByIndex(0, prop1);
        xCont.insertByIndex(1, prop2);
        assertTrue("Did not insert PropertyValue.",
                   xCont.hasElements() && xCont.getCount()==2);

        try {
            xCont.insertByIndex(25, prop2);
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

        xCont.insertByIndex(1, prop2);
        assertTrue("Did not insert PropertyValue.",
                   xCont.hasElements() && xCont.getCount()==2);

        try {
            xCont.insertByIndex(25, prop2);
            fail("IllegalArgumentException was not thrown.");
        }
        catch(com.sun.star.lang.IndexOutOfBoundsException e) {
        }
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

        }
        catch(com.sun.star.lang.IndexOutOfBoundsException e) {
        }

        try {
            xCont.insertByIndex(2, "Example String");
            fail("IllegalArgumentException was not thrown.");
        }
        catch(com.sun.star.lang.IllegalArgumentException e) {
        }
    }
View Full Code Here

Examples of com.sun.star.container.XIndexContainer.insertByIndex()

      /* instanciate an IndexContainer that will take
         a list of draw pages for the first custom show */
      xObj = xFactory.createInstance();
        xContainer = (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, xObj );
      for ( i = 5; i < 10; i++ )
        xContainer.insertByIndex( xContainer.getCount(), xDrawPages.getByIndex( i ) );
      xNameContainer.insertByName( "ShortVersion", xContainer );

      /* instanciate an IndexContainer that will take
         a list of draw page for the second custom show */
      xObj = xFactory.createInstance();
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.