Examples of ClientResource


Examples of com.example.helloworld.resources.ClientResource

   
        final UserDAO dao = new UserDAO(hibernateBundle.getSessionFactory());
        final Client client = new JerseyClientBuilder(environment).using(configuration.getJerseyClient()).build(getName());
        final ClientSecretsConfiguration clientSecrets = configuration.getClientSecrets();
       
        environment.jersey().register(new ClientResource());
        environment.jersey().register(new UserResource(dao));
        environment.jersey().register(new AuthResource(client, dao, clientSecrets));
       
        environment.servlets().addFilter("AuthFilter", new AuthFilter())
          .addMappingForUrlPatterns(null, true, "/api/me");
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

public class MemberEditor extends StandardStructEditor {
    protected MemberModel memberModel;

    public JComponent createJComponent(ViewerFactory factory) {
        ClientResource cr = factory.getClientResource();
        CFJTabbedPane tabbedPane = new CFJTabbedPane(cr);

        try {
            JPanel personPanel = new ArrayPanel(false, ArrayLayout.FULL_SIZE);
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

    public boolean isDialogFactory() {
        return false;
    }

    public static ULCViewerFactory getDefaultUlcInstance(String resourceFileName) {
        ClientResource resource = new ClientResourceImpl(resourceFileName);

        ClientResourceToolkit.initialise(resource);
        ulcViewerFactory = new ULCViewerFactory(resource);
        ulcViewerFactory.setCommandProcessor(new DefaultProcessor());
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

            clientResource = this.clientResource;
        } else if (this.clientResource != clientResource) {
            this.clientResource = clientResource;
        }

        final ClientResource _clientResource = clientResource;
        SwingUtilities.invokeLater
                (new Runnable() {
                    public void run() {
                        String text = _clientResource.getMenuText(resourceKey);
                        if (text != null) {
                            setText(text);
                        } else {
                            setText(resourceKey);
                        }

                        String accel = _clientResource.getKeyAcceleratorText(resourceKey);
                        if (text != null && accel != null) {
                            int mask = Util.getMask(accel);
                            int vKey = Util.getVirtualKey(accel);
                            if (vKey != 0) {
                                setAccelerator(KeyStroke.getKeyStroke(vKey, mask, false));
                            }
                        }

                        int mnemo = _clientResource.getMnemonic(resourceKey, ".menu");
                        if (text != null && mnemo != -1) {
                            setMnemonic(text.charAt(mnemo));
                        }

                        Icon icon = _clientResource.getIcon(resourceKey);
                        if (icon != null) {
                            setIcon(icon);
                        }

                        String tip = _clientResource.getToolTipText(resourceKey);
                        if (tip != null) {
                            setToolTipText(tip);
                        }

                        invalidate();
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

        HTMLTranslator htmlTranslator = parser.getResolver().getHTMLTranslator();

        String translatedName;

        if (htmlTranslator instanceof ClientResource) {
            ClientResource cr = (ClientResource) htmlTranslator;

            Color color = cr.getColor(name);
            StringBuffer result = new StringBuffer(7);
            String s = Integer.toHexString(color.getRed());

            result.append('#');
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

    }

    public void doLayout(DataViewer parent_viewer) {
        try {
            String resourceKey = getModelFieldName();
            ClientResource cr = parent_viewer.getFactory().getClientResource();

            String textString = cr.getLabel(resourceKey);

            XString text = new XString("<html>" + textString);

            text.replace("\\n", "<p>");
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

        model.addDataModelListener(new RemoteDataModelListener(socket.getOutputStream(), socket.getInputStream()));

        JFrame frame = new JFrame();

        frame.addWindowListener(new MyWindowListener());
        ClientResource res = new ClientResourceImpl("TestClient");
        ViewerFactory factory = new ViewerFactory(res);

        factory.setCommandProcessor(new com.nexirius.framework.command.DefaultProcessor());
        DataViewer v = factory.createDefaultEditor(model);
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

            clientResource = this.clientResource;
        } else if (this.clientResource != clientResource) {
            this.clientResource = clientResource;
        }

        final ClientResource _clientResource = clientResource;
//        SwingUtilities.invokeLater
//        (
//            new Runnable()
//            {
//                public void run()
//                {

        String text = _clientResource.getButtonText(resourceKey);

        if (text == null) {
            text = resourceKey;
        }

        setText(text);

        final int mnemo = _clientResource.getMnemonic(resourceKey, ".buttonText");
        if (text != null && mnemo != -1) {
            setMnemonic(text.charAt(mnemo));
        }

        final Icon icon = _clientResource.getIcon(resourceKey);
        if (icon != null) {
            setIcon(icon);

            if (text.length() == 0) {
                setMargin(new Insets(0, 0, 0, 0));
            }
        }

        final String tip = _clientResource.getToolTipText(resourceKey);
        if (tip != null) {
            setToolTipText(tip);
        }
/* FIX there is no setAccelerator method defines in JButton (use a menu status instead!
          final String accel = _clientResource.getKeyAcceleratorText(resourceKey);
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

            System.out.println(model.dragData());

            JFrame frame = new JFrame();

            frame.addWindowListener(new MyWindowListener());
            ClientResource res = new ClientResourceImpl("TestClient");
            ViewerFactory factory = new ViewerFactory(res);

            factory.setCommandProcessor(new com.nexirius.framework.command.DefaultProcessor());
            DataViewer v = factory.createDefaultEditor(model);
View Full Code Here

Examples of com.nexirius.util.resource.ClientResource

  }

  public void update()
  {
    SnapGridLayout layout = new SnapGridLayout(10, 10, 500, 200);
    ClientResource cr = getFactory().getClientResource();

    if (isCreated()) {
      getJPanel().removeAll();
      getJPanel().setLayout(layout);

      DataModel dm;
      JComponent comp;
      JLabel label;

      MultiplePropertyEntry numberColumnProps = new MultiplePropertyEntry();

      numberColumnProps.append(new SinglePropertyEntry("Font", "Courier-BOLDITALIC-14"));
      numberColumnProps.append(new SinglePropertyEntry("Foreground", "pink"));
      numberColumnProps.append(new SinglePropertyEntry("Background", "blue"));
      numberColumnProps.append(new SinglePropertyEntry("Alignment", "1"));

      try {
        int y = 0;
        int xfield = 4;
        int wfield = 6;
        int wlabel = 4;

        dm = getModel().getChild("productNumber");
        comp = createFieldValue(dm);
        numberColumnProps.change(comp, this.getFactory());
        label = new JLabel(cr.getLabel("productNumber"));
        layout.addLayoutComponent(label, 0, y, wlabel, 1);
        layout.addLayoutComponent(comp, xfield, y, wfield, 1);
        getJPanel().add(label);
        getJPanel().add(comp);
        ++y;
        dm = getModel().getChild("name");
        comp = createFieldValue(dm);
        label = new JLabel(cr.getLabel("name"));
        layout.addLayoutComponent(label, 0, y, wlabel, 1);
        layout.addLayoutComponent(comp, xfield, y, wfield, 1);
        getJPanel().add(label);
        getJPanel().add(comp);
        ++y;
        dm = getModel().getChild("description");
        comp = createFieldValue(dm);
        label = new JLabel(cr.getLabel("description"));
        layout.addLayoutComponent(label, 0, y, wlabel, 1);
        layout.addLayoutComponent(comp, xfield, y, wfield, 2);
        getJPanel().add(label);
        getJPanel().add(comp);
        y+=2;
        dm = getModel().getChild("stock");
        comp = createFieldValue(dm);
        label = new JLabel(cr.getLabel("stock"));
        layout.addLayoutComponent(label, 0, y, wlabel, 1);
        layout.addLayoutComponent(comp, xfield, y, wfield, 1);
        getJPanel().add(label);
        getJPanel().add(comp);
        ++y;
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.