Examples of HUD


Examples of org.jdesktop.wonderland.client.hud.HUD

    private LoadingInfo() {
        initHUD();
    }

    private void initHUD() {
        HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");

        if (loadingMessage == null) {
            loadingMessage = mainHUD.createMessage(java.util.ResourceBundle.getBundle("org/jdesktop/wonderland/modules/avatarbase/client/resources/Bundle").getString("Loading_Avatar..."));
            loadingMessage.setPreferredLocation(Layout.CENTER);
            // add HUD control panel to HUD
            mainHUD.addComponent(loadingMessage);
        }
    }
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

    /**
     * Creates the affordance HUD frame.
     *
     */
    private void createHUD() {
        HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");

        // create affordances Swing control
        hudCellPalette = new HUDCellPalette();

        // create HUD control
        paletteHUD = mainHUD.createComponent(hudCellPalette);
        paletteHUD.setName(BUNDLE.getString("Shortcuts"));
        paletteHUD.setPreferredLocation(Layout.NORTHEAST);

        // add affordances HUD panel to main HUD
        mainHUD.addComponent(paletteHUD);
       
        // issue #174 hud visibility management
        paletteHUD.addEventListener(new HUDEventListener() {
            public void HUDObjectChanged(HUDEvent event) {
              HUDEventType hudEventType = event.getEventType();
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

     * NOTE: This method assumes it is being called on the AWT Event Thread
     */
    private HUDComponent createTextChatHUD() {

        // Create a new HUD Panel. It still isn't visible.
        HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");
        HUDComponent hudComponent = mainHUD.createComponent(chatContainerPane);
        hudComponent.setIcon(new ImageIcon(getClass().getResource(
                "/org/jdesktop/wonderland/modules/textchat/client/resources/" +
                "UserListChatText32x32.png")));
        hudComponent.setPreferredLocation(Layout.SOUTHWEST);
        mainHUD.addComponent(hudComponent);

        return hudComponent;
    }
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

        AddHUDPanel addHUDPanel = new AddHUDPanel(client, session,
                myPresenceInfo, myPresenceInfo, group, Mode.ADD);

  addHUDPanel.setPrivacy(addUserPanel.getPrivacy());

        HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");
        addModeAddHUDComponent = mainHUD.createComponent(addHUDPanel);
        addHUDPanel.setHUDComponent(addModeAddHUDComponent);

        addModeAddHUDComponent.setName("Add to Voice Chat");

        addHUDPanel.setPreferredLocation(Layout.EAST);

        mainHUD.addComponent(addModeAddHUDComponent);

        inProgressButtonPanel.setEnabledAddButton(false);

        addModeAddHUDComponent.addEventListener(new HUDEventListener() {
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

    private void AnswerButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AnswerButtonActionPerformed
        logger.info("Sent join accepted message");

        AddHUDPanel addHUDPanel = new AddHUDPanel(client, session, myPresenceInfo, caller, group, Mode.IN_PROGRESS);

        HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");
        addComponent = mainHUD.createComponent(addHUDPanel);
        addComponent.setIcon(new ImageIcon(getClass().getResource("/org/jdesktop/wonderland/modules/audiomanager/client/resources/UserListChatVoice32x32.png")));
  addComponent.setName("Voice Chat");

        addHUDPanel.setHUDComponent(addComponent);

        addHUDPanel.setPreferredLocation(Layout.NORTHWEST);

        mainHUD.addComponent(addComponent);

        addComponent.addEventListener(new HUDEventListener() {
            public void HUDObjectChanged(HUDEvent e) {
                if (e.getEventType().equals(HUDEventType.CLOSED)) {
        addComponent = null;
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

        display.addComponentListener(new ComponentListener() {

            public void componentResized(ComponentEvent e) {
                Iterator<String> iter = huds.keySet().iterator();
                while (iter.hasNext()) {
                    HUD hud = huds.get(iter.next());
                    hud.setDisplayBounds(e.getComponent().getSize());
                }
            }

            public void componentMoved(ComponentEvent e) {
            }
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

    /**
     * {@inheritDoc}
     */
    public HUD getHUD(String name) {
        HUD hud = null;
        if (name != null) {
            hud = huds.get(name);
        }
        return hud;
    }
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

        if (event.getObject() instanceof HUD) {
            if (logger.isLoggable(Level.FINE)) {
                logger.fine("HUDManager received HUD event: " + event);
            }

            HUD hud = (HUD) event.getObject();

            switch (event.getEventType()) {
                case ADDED:
                    break;
                case REMOVED:
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

        // create the main Wonderland HUD
        //
        logger.fine("creating main HUD: " +
                DEFAULT_HUD_WIDTH + "x" + DEFAULT_HUD_HEIGHT +
                " at " + DEFAULT_HUD_X + ", " + DEFAULT_HUD_Y);
        final HUD wonderlandHUD = HUDFactory.createHUD(canvas.getSize(),
                DEFAULT_HUD_X, DEFAULT_HUD_Y, DEFAULT_HUD_WIDTH, DEFAULT_HUD_HEIGHT);
        wonderlandHUD.setName("main");

        // create the default HUD Manager factory
        HUDManagerFactory.setHUDManagerFactorySPI(new WonderlandHUDManagerFactory());

        // create a HUD manager instance to manage all the HUDs
        HUDManager manager = HUDManagerFactory.createHUDManager(canvas);

        // define how HUDs are laid out on the screen
        manager.setLayoutManager(new HUDAbsoluteLayoutManager(wonderlandHUD));

        // manage the main HUD
        manager.addHUD(wonderlandHUD);

        // create a component manager for the HUD components in this HUD
        HUDComponentManager compManager = new WonderlandHUDComponentManager(wonderlandHUD);

        // define the layout of HUD components in the Wonderland main HUD
        compManager.setLayoutManager(new HUDCompassLayoutManager(wonderlandHUD));

        // manage the components in the main HUD
        wonderlandHUD.addEventListener(compManager);

        // create a HUD for icons
        //
        logger.fine("creating icon HUD: " + DEFAULT_HUD_WIDTH + "x" + ICON_HUD_HEIGHT +
                " at " + DEFAULT_HUD_X + ", " + DEFAULT_HUD_Y);
        final HUD iconHUD = HUDFactory.createHUD(canvas.getSize(),
                DEFAULT_HUD_X, DEFAULT_HUD_Y, DEFAULT_HUD_WIDTH, ICON_HUD_HEIGHT);
        iconHUD.setName("icon");

        // manage the icon bar HUD
        manager.addHUD(iconHUD);

        // create a component manager for the HUD components in the icon HUD
        HUDComponentManager iconCompManager = new WonderlandHUDIconManager(iconHUD);

        // define the layout of HUD components in the icon HUD
        iconCompManager.setLayoutManager(new HUDFlowLayoutManager(iconHUD));

        // icon manager manages components in the main HUD
        wonderlandHUD.addEventListener(iconCompManager);

        // icon manager manages components in the icon HUD too
        iconHUD.addEventListener(iconCompManager);

        // call the superclass's initialize method
        super.initialize(loginManager);
    }
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUD

            listener.userInRange(info, userInRange, isInRange);
        }
    }

    public void removeDialogs() {
        HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");
       
        if (vuMeterComponent != null) {
            vuMeterComponent.setVisible(false);
            mainHUD.removeComponent(vuMeterComponent);
            vuMeterComponent = null;
        }

        if (vuMeterMiniComponent != null) {
            vuMeterMiniComponent.setVisible(false);
            mainHUD.removeComponent(vuMeterMiniComponent);
            vuMeterComponent = null;
        }
    }
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.