Package org.omg.CORBA

Examples of org.omg.CORBA.StringHolder


     * @return UGraphic[] graphic list or null if error
     */
    protected UGraphic[] getSpecGraphics(Projection p) {
        CProjection cproj;
        LLPoint ll1, ll2;
        StringHolder dynamicArgsHolder;
        UGraphic[] graphics = null;
        Server spec = getSpecialist();
        if (Debug.debugging("cspec"))
            Debug.output(getName() + "|CSpecLayer.getSpecGraphics()");

        cproj = new CProjection((short) (p.getProjectionType()), new LLPoint(p.getCenter()
                .getLatitude(), p.getCenter().getLongitude()), (short) p.getHeight(), (short) p.getWidth(), (int) p.getScale());

        // lat-lon "box", (depends on the projection)
        LatLonPoint ul = p.getUpperLeft();
        LatLonPoint lr = p.getLowerRight();

        ll1 = new LLPoint(ul.getLatitude(), ul.getLongitude());
        ll2 = new LLPoint(lr.getLatitude(), lr.getLongitude());

        // check for cancellation
        if (isCancelled()) {
            dirtybits |= PREMATURE_FINISH;
            if (Debug.debugging("cspec"))
                Debug.output(getName()
                        + "|CSpecLayer.getSpecGraphics(): aborted.");
            return null;
        }
        // check for null specialist
        if (spec == null) {
            if (Debug.debugging("cspec")) {
                System.err.println(getName()
                        + "|CSpecLayer.getSpecGraphics(): null specialist!");
            }
            return null;
        }

        try {
            // Keep the gestures up-to-date
            mapGesture.setProjection(p);

            // Static Args can't go out null....
            String staticArguments = getStaticArgs();
            if (staticArguments == null) {
                staticArguments = "";
                setStaticArgs(staticArguments);
            }

            // neither can dynamic args
            // Layer.getArgs() was deprecated and removed
            dynamicArgsHolder = new StringHolder(getArgs());
            if (dynamicArgsHolder.value == null) {
                dynamicArgsHolder.value = "";
            }

            // call getRectangle();
View Full Code Here


    
     */
    protected UGraphic[] getSpecGraphics(Projection p) {
        CProjection cproj;
        LLPoint ll1, ll2;
        StringHolder dynamicArgsHolder;
        Server spec = getSpecialist();
        if (Debug.debugging("cspec")) {
            System.out.println(getName()
                    + "|BufferedCSpecLayer.getSpecGraphics()");
        }

        // If we have graphics, return them
        if (graphics != null) {
            System.out.println("Returning cached graphics");
            return graphics;
        }

        cproj = new CProjection((short) (p.getProjectionType()), new LLPoint(p.getCenter()
                .getLatitude(), p.getCenter().getLongitude()), (short) p.getHeight(), (short) p.getWidth(), (int) p.getScale());

        // lat-lon "box", (depends on the projection)
        LatLonPoint ul = p.getUpperLeft();
        LatLonPoint lr = p.getLowerRight();

        //      ll1 = new LLPoint(ul.getLatitude(), ul.getLongitude());
        //      ll2 = new LLPoint(lr.getLatitude(), lr.getLongitude());
        // Adjust lat/lon for total global area
        ll1 = new LLPoint(90.0f, -180.0f);
        ll2 = new LLPoint(-90.0f, 180.0f);
        // check for cancellation
        if (isCancelled()) {
            dirtybits |= PREMATURE_FINISH;
            if (Debug.debugging("cspec"))
                System.out.println(getName()
                        + "|BufferedCSpecLayer.getSpecGraphics(): aborted.");
            return null;
        }
        // check for null specialist
        if (spec == null) {
            System.err.println(getName()
                    + "|BufferedCSpecLayer.getSpecGraphics(): null specialist!");
            return null;
        }
        try {
            // Keep the gestures up-to-date
            mapGesture.setProjection(p);

            // Static Args can't go out null....
            String staticArguments = getStaticArgs();
            if (staticArguments == null) {
                staticArguments = "";
                setStaticArgs(staticArguments);
            }

            // neither can dynamic args
            dynamicArgsHolder = new StringHolder(getArgs());
            if (dynamicArgsHolder.value == null) {
                dynamicArgsHolder.value = "";
            }

            // call getRectangle();
View Full Code Here

        int a_long = in.read_long();
        ShortHolder a_short = new ShortHolder();
        a_short.value = in.read_short();

        StringHolder a_string = new StringHolder();
        a_string.value = in.read_string();

        DoubleHolder a_double = new DoubleHolder();
        int result = passSimple(an_octet, a_long, a_short, a_string, a_double);
        out = rh.createReply();
View Full Code Here

  public void testParameters()
  {
    ByteHolder a_byte = new ByteHolder((byte) 0);
    ShortHolder a_short = new ShortHolder((short) 3);
    StringHolder a_string = new StringHolder("[string 4]");

    // This is an 'out' parameter; the value must not be passed to servant.
    DoubleHolder a_double = new DoubleHolder(56.789);

    int returned = object.passSimple(a_byte, 2, a_short, a_string, a_double);
View Full Code Here

    Request r =
      object._create_request(null, "passSimple", orb.create_list(0), null);

    ByteHolder a_byte = new ByteHolder((byte) 0);
    ShortHolder a_short = new ShortHolder((short) 3);
    StringHolder a_string = new StringHolder("[string 4]");

    // This is an 'out' parameter; the value must not be passed to servant.
    DoubleHolder a_double = new DoubleHolder(56.789);

    r.add_inout_arg().insert_octet((byte) 0);
View Full Code Here

    {
        controlPullCoffeeOperations_.setDefaultMatcher(new AbstractMatcher()
        {
            public boolean matches(Object[] arg0, Object[] arg1)
            {
                StringHolder name = (StringHolder) arg0[0];

                if (name != null)
                {
                    // need to set the out param.
                    name.value = "";
View Full Code Here

        mockPullCoffee_.try_cancel_coffee(null);
        controlPullCoffeeOperations_.setMatcher(new AbstractMatcher()
        {
            public boolean matches(Object[] arg0, Object[] arg1)
            {
                StringHolder name = (StringHolder) arg0[0];

                if (name != null)
                {
                    // need to set the out param
                    name.value = "jacorb";
View Full Code Here

        mockPullCoffee_.try_drinking_coffee(null, null);
        controlPullCoffeeOperations_.setMatcher(new AbstractMatcher()
        {
            public boolean matches(Object[] expected, Object[] actual)
            {
                StringHolder name = (StringHolder) expected[0];
                IntHolder minutes = (IntHolder) expected[1];

                // need to set the out params
                if (name != null)
                {
                    name.value = "jacorb";
                }

                if (minutes != null)
                {
                    minutes.value = 20;
                }

                return true;
            }
        });
        controlPullCoffeeOperations_.setReturnValue(true);

        mockPullCoffee_.try_cancel_coffee(null);
        controlPullCoffeeOperations_.setMatcher(new AbstractMatcher()
        {
            public boolean matches(Object[] expected, Object[] actual)
            {
                StringHolder name = (StringHolder) expected[0];

                if (name != null)
                {
                    // need to set the out param
                    name.value = "";
View Full Code Here

        String _objectAsString = _object.toString();

        PullCoffee _pullCoffee = PullCoffeeHelper.narrow(getClientORB().string_to_object(
                _objectAsString));

        StringHolder _name = new StringHolder();
        IntHolder _minutes = new IntHolder();

        assertFalse(_pullCoffee.try_drinking_coffee(_name, _minutes));
    }
View Full Code Here

        String _objectAsString = _object.toString();

        PullCoffee _pullCoffee = PullCoffeeHelper.narrow(getClientORB().string_to_object(
                _objectAsString));

        StringHolder _name = new StringHolder();
        IntHolder _minutes = new IntHolder();

        objectUnderTest_.getMessageConsumer().queueMessage(_mesg.getHandle());

        assertTrue(_pullCoffee.try_drinking_coffee(_name, _minutes));
View Full Code Here

TOP

Related Classes of org.omg.CORBA.StringHolder

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.