Examples of BasicController


Examples of com.art.anette.client.controller.BasicController

            logger.severe("SSL Failure", ex);
            ProgressUtils.errorMessage("SSLFailed");
            System.exit(1);
        }

        final BasicController basicControl = BasicController.getInstance();

        // nicht registriert oder eingeloggt
        if ("".equals(config.getProperty("user.email")) || "".equals(config.getProperty("user.password"))) {
            showWelcomeDialog(config, basicControl, "", "");
        } else {
            try {
                final ProgressUtils.Monitor monitor = ProgressUtils.createProgress(lang.getString("ProgressLoggingIn"));
                basicControl.login(new LoginRequest(config.getProperty("user.email"), config.getProperty("user.password")));
                monitor.finish();
            } catch (NetworkException ex) {
                logger.warning("Connection Failure", ex);
                ProgressUtils.errorMessage(lang.getString("ConnectionFailed"), ex.getMessage());
                showWelcomeDialog(config, basicControl, config.getProperty("user.email"), config.getProperty("user.password"));
            } catch (LoginFailedException ex) {
                ProgressUtils.errorMessage(String.format(lang.getString("LoginFailed"), ex.getMessage()));
                logger.info("Login Failure", ex);
                showWelcomeDialog(config, basicControl, config.getProperty("user.email"), config.getProperty("user.password"));
            }
        }

        // nun eingeloggt; starte Hauptfenster
        if (basicControl.isLoggedIn()) {
            try {
                final ProgressUtils.Monitor progress = ProgressUtils.createProgress(lang.getString("ProgressLogicDatabase"));
                final Logic logic = Logic.getInstance(config, basicControl.getLoggedInEmployee());
                NetworkControl.getInstance().setLoginData(basicControl.getLoginData(), logic.getDBControl());
                NetworkControl.getInstance().start();
                ClientConfiguration.getInstance().setProperty("db.dirty", "true");
                ClientConfiguration.getInstance().writeConfiguration();
                progress.finish();
                SwingUtilities.invokeLater(new Runnable() {
View Full Code Here

Examples of com.art.anette.client.controller.BasicController

            logger.severe("SSL Failure", ex);
            ProgressUtils.errorMessage("SSLFailed");
            throw new Exception("SSL-problem");
        }

        final BasicController basicControl = BasicController.getInstance();

        // nicht registriert oder eingeloggt
        assert !("".equals(config.getProperty("user.email")) || "".equals(config.getProperty("user.password")));

        try {
            final ProgressUtils.Monitor monitor = ProgressUtils.createProgress(lang.getString("ProgressLoggingIn"));
            basicControl.login(new LoginRequest(config.getProperty("user.email"), config.getProperty("user.password")));
            monitor.finish();
        } catch (NetworkException ex) {
            logger.severe("Connection Failure", ex);
            return;
        } catch (LoginFailedException ex) {
            logger.severe("Login Failure", ex);
            return;
        }

        // nun eingeloggt; starte Hauptfenster
        assert basicControl.isLoggedIn();

        final Logic logic;
        try {
            logic = Logic.getInstance(config, basicControl.getLoggedInEmployee());
        } catch (LogicInitFailedException e) {
            logger.severe("Can't create logic");
            return;
        }
        network.setLoginData(basicControl.getLoginData(), logic.getDBControl());
        network.start();
        ClientConfiguration.getInstance().setProperty("db.dirty", "true");
        ClientConfiguration.getInstance().writeConfiguration();

        if (sleepTime == 0) {
View Full Code Here

Examples of diva.canvas.toolbox.BasicController

    public IconTutorial() {
        canvas = new JCanvas();
        graphicsPane = (GraphicsPane) canvas.getCanvasPane();

        // Create a controller to do the work.
        controller = new BasicController(graphicsPane);
        defaultInteractor = controller.getSelectionInteractor();

        // Create a manipulator to give resize handles on figures
        BoundsManipulator figureManipulator = new BoundsManipulator();
        controller.setSelectionManipulator(figureManipulator);
View Full Code Here

Examples of diva.canvas.toolbox.BasicController

        BasicFrame frame = new BasicFrame("Connector tutorial", canvas);
        frame.setSize(600, 400);
        frame.setVisible(true);

        controller = new BasicController(graphicsPane);
    }
View Full Code Here

Examples of diva.canvas.toolbox.BasicController

     */
    public CompositeFigureTutorial() {
        canvas = new JCanvas();
        graphicsPane = (GraphicsPane) canvas.getCanvasPane();
        layer = graphicsPane.getForegroundLayer();
        controller = new BasicController(graphicsPane);
        defaultInteractor = controller.getSelectionInteractor();

        BasicFrame frame = new BasicFrame("Composite figure tutorial", canvas);
        frame.setSize(600, 400);
        frame.setVisible(true);
View Full Code Here

Examples of diva.canvas.toolbox.BasicController

        BasicFrame frame = new BasicFrame("Connector tutorial", canvas);
        frame.setSize(600, 400);
        frame.setVisible(true);

        controller = new BasicController(graphicsPane);
    }
View Full Code Here

Examples of diva.canvas.toolbox.BasicController

    public TerminalTutorial() {
        canvas = new JCanvas();
        graphicsPane = (GraphicsPane) canvas.getCanvasPane();

        // Create a controller to do the work.
        controller = new BasicController(graphicsPane);
        defaultInteractor = controller.getSelectionInteractor();

        // Create the window
        BasicFrame frame = new BasicFrame("Simple canvas tutorial", canvas);
        frame.setSize(600, 400);
View Full Code Here

Examples of diva.canvas.toolbox.BasicController

        // Get the figure layer
        figureLayer = getForegroundLayer();

        // Construct a simple controller and get the default interactor
        controller = new BasicController(this);
        selectionInteractor = controller.getSelectionInteractor();

        // Draw it
        drawFigures();
    }
View Full Code Here

Examples of diva.canvas.toolbox.BasicController

    public LabelTutorial() {
        canvas = new JCanvas();
        graphicsPane = (GraphicsPane) canvas.getCanvasPane();

        // Create a controller to do the work.
        controller = new BasicController(graphicsPane);
        defaultInteractor = controller.getSelectionInteractor();

        // Create the window
        BasicFrame frame = new BasicFrame("Simple canvas tutorial", canvas);
        frame.setSize(600, 400);
View Full Code Here

Examples of diva.canvas.toolbox.BasicController

     */
    public void createFigures() {
        FigureLayer layer = graphicsPane.getForegroundLayer();

        // Create a controller to do the work.
        BasicController controller = new BasicController(graphicsPane);
        SelectionInteractor defaultInteractor = controller
                .getSelectionInteractor();
        BoundsManipulator manip = new BoundsManipulator();
        defaultInteractor.setPrototypeDecorator(manip);

        // Create a simple Vector Figure that draws a cross
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.