Package nz.govt.natlib.meta.ui

Examples of nz.govt.natlib.meta.ui.ImageButton


  public PropertyEditorController(PropertyContainer properties) {

    view = new PropertyEditor(properties);
    try {
      ok = new ImageButton("Ok", new ImageIcon(ImagePanel
          .resolveImage("button_ok.gif")));
      cancel = new ImageButton("Close", new ImageIcon(ImagePanel
          .resolveImage("button_close.gif")));
      jbInit();
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here


    try {
      closeIcon = new ImageIcon(ImagePanel
          .resolveImage("button_close.gif"));
    } catch (Exception e) {
    }
    ImageButton close = new ImageButton("Close", closeIcon);

    titledBorder2 = new TitledBorder(BorderFactory.createEtchedBorder(
        Color.white, new Color(148, 145, 140)), "Log Messages");
    titledBorder3 = new TitledBorder(BorderFactory.createEtchedBorder(
        Color.white, new Color(148, 145, 140)), "Message Filter");
    this.getContentPane().setLayout(gridBagLayout1);
    jMenu1.setText("File");
    openMenu.setText("Open");
    openMenu.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        openMenu_actionPerformed(e);
      }
    });
    closeMenu.setText("Close");
    closeMenu.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        closeMenu_actionPerformed(e);
      }
    });
    this.setJMenuBar(mainMenu);
    this.addWindowListener(new java.awt.event.WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        this_windowClosing(e);
      }
    });
    jPanel1.setLayout(borderLayout1);
    jLabel1.setText("Message Priority:");
    close.setMnemonic('C');
    close.setText("Close");
    close.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        close_actionPerformed(e);
      }
    });
    jPanel3.setBorder(titledBorder3);
View Full Code Here

          new LogMessage(LogMessage.ERROR, e, "Image not found",
              "Installation may be corrupt?"));
    }
    Border mapBorder = new TitledBorder(BorderFactory.createEtchedBorder(
        Color.white, new Color(148, 145, 140)), "Add/Remove Mappings");
    addAdapter = new ImageButton("Add", addPic);
    addAdapter.addActionListener(new AddAdapterAction());
    delAdapter = new ImageButton("Delete", delPic);
    delAdapter.addActionListener(new DelAdapterAction());
    buttonPnl.add(addAdapter);
    buttonPnl.add(delAdapter);
    mainPnl.setLayout(new BorderLayout());
    buttonBfrPnl.add(buttonPnl);
View Full Code Here

    this.parent = frame;
    setResizable(false);
    this.title = title;
    items = new ArrayList();
    try {
      next = new ImageButton("Next", new ImageIcon(ImagePanel
          .resolveImage("button_next.gif")));
      finish = new ImageButton("Finish", new ImageIcon(ImagePanel
          .resolveImage("button_ok.gif")));
      previous = new ImageButton("Prev", new ImageIcon(ImagePanel
          .resolveImage("button_prev.gif")));
      cancel = new ImageButton("Cancel", new ImageIcon(ImagePanel
          .resolveImage("button_cancel.gif")));
      jbInit();
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

        return getMinimumSize();
      }
    };
    ImageIcon folder = null;
    try {
      delConfigButt = new ImageButton("Delete", new ImageIcon(ImagePanel
          .resolveImage(BUTTON_DELETE)));
      createConfigButt = new ImageButton("Create", new ImageIcon(
          ImagePanel.resolveImage(BUTTON_CREATE)));
      folder = new ImageIcon(ImagePanel.resolveImage(BUTTON_FOLDER));
    } catch (Exception e) {
      LogManager.getInstance().logMessage(
          new LogMessage(LogMessage.ERROR, e, "Image not found",
              "Installation may be corrupt?"));
    }
    Border configBorder = new TitledBorder(BorderFactory
        .createEtchedBorder(Color.white, new Color(148, 145, 140)),
        "Configuration Selection");
    Border settingBorder = new TitledBorder(BorderFactory
        .createEtchedBorder(Color.white, new Color(148, 145, 140)),
        "Options");
    JPanel bufferPnl = new JPanel(new BorderLayout());
    mainPnl.setLayout(new BorderLayout());
    JPanel configPnl = new JPanel(new GridBagLayout());
    configPnl.setBorder(configBorder);
    JPanel optionPnl = new JPanel(new GridBagLayout());
    optionPnl.setBorder(settingBorder);
    JLabel configLbl = new JLabel("Profile to edit:");
    profileCmb = new NLNZCombo();
    profileCmb.setEditable(true);
    createConfigButt.setEnabled(false);
    JLabel outputDirLbl = new JLabel("Input Directory:");
    JLabel logDirLbl = new JLabel("Log Directory:");
    ImageButton logDirButt = new ImageButton(folder);
    ImageButton inputDirButt = new ImageButton(folder);
    logDirButt.setToolTipText("Set Log Destination Folder");
    inputDirButt.setToolTipText("Set Input Directory Folder");

    delConfigButt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (profileCmb.getSelectedIndex() > -1) {
          if (profileCmb.getModel().getSize() > 1) {
            delProfile((Profile) profileCmb.getSelectedItem());
          }
        }
      }
    });
    createConfigButt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        createProfile((String) profileCmb.getSelectedItem());
      }
    });
    logDirButt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        File selected = FileDialog.showSelectDialog(parent, new File(
            logDir.getText()).getAbsolutePath());
        if ((selected != null) && (selected.isDirectory())) {
          logDir.setText(selected.getAbsolutePath());
        }
      }
    });
    inputDirButt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        File selected = FileDialog.showSelectDialog(parent, new File(
            inputDir.getText()).getAbsolutePath());
        if ((selected != null) && (selected.isDirectory())) {
          inputDir.setText(selected.getAbsolutePath());
View Full Code Here

          new LogMessage(LogMessage.ERROR, e, "Image not found",
              "Installation may be corrupt?"));
    }
    Border mapBorder = new TitledBorder(BorderFactory.createEtchedBorder(
        Color.white, new Color(148, 145, 140)), "Add/Remove Mappings");
    addMap = new ImageButton("Add", addPic);
    addMap.addActionListener(new AddMapAction());
    delMap = new ImageButton("Delete", delPic);
    delMap.addActionListener(new DelMapAction());
    buttonPnl.add(addMap);
    buttonPnl.add(delMap);
    JPanel bottomPnl = new JPanel(new BorderLayout());
    buttonBfrPnl.add(buttonPnl);
View Full Code Here

    } catch (Exception e) {
      LogManager.getInstance().logMessage(
          new LogMessage(LogMessage.ERROR, e, "Image not found",
              "Installation may be corrupt?"));
    }
    addUser = new ImageButton("Add", addPic);
    addUser.addActionListener(new AddUserAction());
    delUser = new ImageButton("Del", delPic);
    delUser.addActionListener(new DelUserAction());
    buttonPnl.add(addUser);
    buttonPnl.add(delUser);
    buttonBfrPnl.add(buttonPnl);
    mainPnl.add(scroll, BorderLayout.CENTER);
View Full Code Here

            (User) configCmb.getSelectedItem());
      }
    });
    JLabel outputDirLbl = new JLabel("Input Directory:");
    JLabel logDirLbl = new JLabel("Log Directory:");
    ImageButton logDirButt = null;
    ImageButton inputDirButt = null;
    logDirButt = new ImageButton(folder);
    inputDirButt = new ImageButton(folder);
    logDirButt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        File selected = FileDialog.showSelectDialog(parent, new File(
            logDir.getText()).getAbsolutePath());
        if ((selected != null) && (selected.isDirectory())) {
          logDir.setText(selected.getAbsolutePath());
        }
      }
    });
    inputDirButt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        File selected = FileDialog.showSelectDialog(parent, new File(
            inputDir.getText()).getAbsolutePath());
        if ((selected != null) && (selected.isDirectory())) {
          inputDir.setText(selected.getAbsolutePath());
        }
      }
    });
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.insets = new Insets(5, 5, 5, 5);
    gbc.weightx = 0;
    optionPnl.add(userLbl, gbc);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 3;
    gbc.gridx = 1;
    optionPnl.add(configCmb, gbc);
    gbc.gridx = 0;
    gbc.gridy = 1;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.weightx = 0;
    optionPnl.add(outputDirLbl, gbc);
    gbc.gridx = 1;
    gbc.gridy = 1;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    optionPnl.add(inputDir, gbc);
    gbc.gridx = 2;
    gbc.gridy = 1;
    gbc.fill = GridBagConstraints.NONE;
    gbc.weightx = 0;
    optionPnl.add(inputDirButt, gbc);
    gbc.gridx = 0;
    gbc.gridy = 2;
    gbc.weightx = 0;
    optionPnl.add(logDirLbl, gbc);
    gbc.gridx = 1;
    gbc.gridy = 2;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    optionPnl.add(logDir, gbc);
    gbc.gridx = 2;
    gbc.gridy = 2;
    gbc.fill = GridBagConstraints.NONE;
    gbc.weightx = 0;
    optionPnl.add(logDirButt, gbc);

    JLabel oldPasswordLbl = new JLabel("Old Password:");
    JLabel newPasswordLbl = new JLabel("New Password:");
    JLabel confirmPasswordLbl = new JLabel("Confirm Password:");
    final JPasswordField oldPasswordTxt = new JPasswordField();
    final JPasswordField newPasswordTxt = new JPasswordField();
    final JPasswordField confirmPasswordTxt = new JPasswordField();
    ImageButton changeBtn = new ImageButton("Change Password!",
        passwordButtonIcon);

    // GridBagConstraints pgbc = new GridBagConstraints();
    // pgbc.gridx = 0;
    // pgbc.gridy = 0;
    // pgbc.insets = new Insets(5,5,5,5);
    // pgbc.weightx = 0;
    // passwordPnl.add(oldPasswordLbl,pgbc);
    // pgbc.gridx = 1;
    // pgbc.weightx = 3;
    // pgbc.fill = GridBagConstraints.HORIZONTAL;
    // passwordPnl.add(oldPasswordTxt,pgbc);
    // pgbc.gridx = 0;
    // pgbc.gridy = 1;
    // pgbc.weightx = 0;
    // pgbc.fill = GridBagConstraints.NONE;
    // passwordPnl.add(newPasswordLbl,pgbc);
    // pgbc.gridx = 1;
    // pgbc.weightx = 3;
    // pgbc.fill = GridBagConstraints.HORIZONTAL;
    // passwordPnl.add(newPasswordTxt,pgbc);
    // pgbc.gridx = 0;
    // pgbc.gridy = 2;
    // pgbc.weightx = 0;
    // pgbc.fill = GridBagConstraints.NONE;
    // passwordPnl.add(confirmPasswordLbl,pgbc);
    // pgbc.gridx = 1;
    // pgbc.weightx = 3;
    // pgbc.fill = GridBagConstraints.HORIZONTAL;
    // passwordPnl.add(confirmPasswordTxt,pgbc);
    // pgbc.gridx = 2;
    // pgbc.gridy = 2;
    // pgbc.weightx = 0;
    // pgbc.fill = GridBagConstraints.NONE;
    // passwordPnl.add(changeBtn,pgbc);

    changeBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        String oldPassword = new String(oldPasswordTxt.getPassword());
        String newPassword = new String(newPasswordTxt.getPassword());
        String confirmPassword = new String(confirmPasswordTxt
            .getPassword());
View Full Code Here

    try {
      closeIcon = new ImageIcon(ImagePanel
          .resolveImage("button_close.gif"));
    } catch (Exception e) {
    }
    ImageButton closeHelp = new ImageButton("Close", closeIcon);
    closeHelp.setMnemonic('C');
    closeHelp.setText("Close");
    closeHelp.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        closeHelp_actionPerformed(e);
      }
    });
    jPanel1.setLayout(flowLayout1);
View Full Code Here

    userIcon = new ImageIcon(ImagePanel.resolveImage(USERS_ICON));
    mappingIcon = new ImageIcon(ImagePanel.resolveImage(MAPPINGS_ICON));
    adapterIcon = new ImageIcon(ImagePanel.resolveImage(ADAPTER_ICON));
    adaptersIcon = new ImageIcon(ImagePanel.resolveImage(MAINTENANCE_ICON));
    adminIcon = new ImageIcon(ImagePanel.resolveImage(ADMIN_ICON));
    applyBtn = new ImageButton("OK", applyIcon);
    cancelBtn = new ImageButton("Cancel", cancelIcon);
    this.getContentPane().setLayout(new GridBagLayout());
    generalPanel = new GeneralPanel(parent);
    mainTabs.addTab("General", new ImageIcon(icon), generalPanel,
        "General Config Options");
    adaptersPanel = new AdapterPanel(parent);
View Full Code Here

TOP

Related Classes of nz.govt.natlib.meta.ui.ImageButton

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.