コード例 #1
0
ファイル: NotesAndFilesWindow.java プロジェクト: jwarrick/JEX
  public NotesAndFilesWindow() {
    SSCenter.defaultCenter()
        .connect(JEXStatics.jexManager, JEXManager.DATASETS, this, "arrayChanged", (Class[]) null);

    // Initialize
    initialize();
    arrayChanged();
  }
コード例 #2
0
  private void initialize() {
    this.dataBrowser = new DataBrowser();
    this.dataBrowser.setScrollBars(1, null);

    // Make appropriate connections
    SSCenter.defaultCenter()
        .connect(
            JEXStatics.jexManager,
            JEXManager.AVAILABLEOBJ,
            this,
            "viewedEntryChanged",
            (Class[]) null);

    // Make the dialog
    dialog = new ValueBrowser(this);

    // Make appropriate connections
    SSCenter.defaultCenter()
        .connect(
            this.dataBrowser,
            DataBrowser.SIG_EntryChanged_NULL,
            this,
            "entryChanged",
            (Class[]) null);
    SSCenter.defaultCenter()
        .connect(
            this.dataBrowser,
            DataBrowser.SIG_EntryScrollFinished_NULL,
            this,
            "entryScrollFinished",
            (Class[]) null);
    SSCenter.defaultCenter()
        .connect(
            this.dataBrowser,
            DataBrowser.SIG_ScrollStarted_NULL,
            this,
            "scrollStarted",
            (Class[]) null);

    // display stuff
    viewedEntryChanged();
  }
コード例 #3
0
ファイル: InfoPanel.java プロジェクト: jwarrick/JEX
 public void actionPerformed(ActionEvent arg0) {
   SSCenter.defaultCenter().emit(this, SIG_OkClicked_NULL, (Object[]) null);
 }
コード例 #4
0
ファイル: NotesAndFilesWindow.java プロジェクト: jwarrick/JEX
  /** Initalize */
  private void initialize() {
    this.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
    this.setVisible(false);
    this.setResizable(true);
    this.setBounds(topLeftX, topLeftY, windowWidth, windowHeight);
    this.setMinimumSize(new Dimension(75, 300));
    this.setTitle("Je'Xperiment - Notes and attached Files");

    menuPanel = new JPanel();
    menuPanel.setBackground(DisplayStatics.background);
    menuPanel.setLayout(new BoxLayout(menuPanel, BoxLayout.LINE_AXIS));
    menuPanel.setMaximumSize(new Dimension(1000, 40));
    menuPanel.setPreferredSize(new Dimension(100, 40));

    Image icondb = JEXStatics.iconRepository.getImageWithName(IconRepository.DATABASE, 20, 20);
    Image iconOverdb = JEXStatics.iconRepository.getImageWithName(IconRepository.DATABASE, 20, 20);
    Image iconPresseddb =
        JEXStatics.iconRepository.getImageWithName(IconRepository.DATABASE, 20, 20);
    Image greyBox = JEXStatics.iconRepository.boxImage(30, 30, DisplayStatics.dividerColor);
    dbLevel.setBackgroundColor(DisplayStatics.background);
    dbLevel.setForegroundColor(DisplayStatics.lightBackground);
    dbLevel.setClickedColor(DisplayStatics.menuBackground, DisplayStatics.lightBackground);
    dbLevel.setSize(new Dimension(60, 40));
    dbLevel.setImage(icondb);
    dbLevel.setMouseOverImage(iconOverdb);
    dbLevel.setMousePressedImage(iconPresseddb);
    dbLevel.setDisabledImage(greyBox);
    dbLevel.setText("DB notes");
    SSCenter.defaultCenter()
        .connect(
            dbLevel, SignalMenuButton.SIG_ButtonClicked_NULL, this, "viewDBlevel", (Class[]) null);
    menuPanel.add(Box.createHorizontalStrut(2));
    menuPanel.add(dbLevel);

    Image iconexp =
        JEXStatics.iconRepository.getImageWithName(IconRepository.EXPERIMENT_ICON, 20, 20);
    Image iconOverexp =
        JEXStatics.iconRepository.getImageWithName(IconRepository.EXPERIMENT_ICON, 20, 20);
    Image iconPressedexp =
        JEXStatics.iconRepository.getImageWithName(IconRepository.EXPERIMENT_ICON, 20, 20);
    expLevel.setBackgroundColor(DisplayStatics.background);
    expLevel.setForegroundColor(DisplayStatics.lightBackground);
    expLevel.setClickedColor(DisplayStatics.menuBackground, DisplayStatics.lightBackground);
    expLevel.setSize(new Dimension(70, 40));
    expLevel.setImage(iconexp);
    expLevel.setMouseOverImage(iconOverexp);
    expLevel.setMousePressedImage(iconPressedexp);
    expLevel.setDisabledImage(greyBox);
    expLevel.setText("Exp. notes");
    SSCenter.defaultCenter()
        .connect(
            expLevel,
            SignalMenuButton.SIG_ButtonClicked_NULL,
            this,
            "viewEXPlevel",
            (Class[]) null);
    menuPanel.add(Box.createHorizontalStrut(5));
    menuPanel.add(expLevel);

    Image icontray = JEXStatics.iconRepository.getImageWithName(IconRepository.TRAY_ICON, 20, 20);
    Image iconOvertray =
        JEXStatics.iconRepository.getImageWithName(IconRepository.TRAY_ICON, 20, 20);
    Image iconPressedtray =
        JEXStatics.iconRepository.getImageWithName(IconRepository.TRAY_ICON, 20, 20);
    trayLevel.setBackgroundColor(DisplayStatics.background);
    trayLevel.setForegroundColor(DisplayStatics.lightBackground);
    trayLevel.setClickedColor(DisplayStatics.menuBackground, DisplayStatics.lightBackground);
    trayLevel.setSize(new Dimension(70, 40));
    trayLevel.setImage(icontray);
    trayLevel.setMouseOverImage(iconOvertray);
    trayLevel.setMousePressedImage(iconPressedtray);
    trayLevel.setDisabledImage(greyBox);
    trayLevel.setText("Array notes");
    SSCenter.defaultCenter()
        .connect(
            trayLevel,
            SignalMenuButton.SIG_ButtonClicked_NULL,
            this,
            "viewTraylevel",
            (Class[]) null);
    menuPanel.add(Box.createHorizontalStrut(2));
    menuPanel.add(trayLevel);

    if (dbNotes == null) dbNotes = new NotesPanel("Database Level");
    if (expNotes == null) expNotes = new NotesPanel("Experiment Level");
    if (arrayNotes == null) arrayNotes = new NotesPanel("Array Level");

    centerPanel = new JPanel();
    centerPanel.setBackground(DisplayStatics.background);
    centerPanel.setLayout(new BorderLayout());
    centerPanel.add(menuPanel, BorderLayout.PAGE_START);
    centerPanel.add(dbNotes, BorderLayout.CENTER);

    this.add(centerPanel);
  }