Esempio n. 1
0
  private void invalidateIfNeeded() {
    if (myLabel.getRootPane() == null) return;

    Dimension d = myLabel.getSize();
    Dimension pref = myLabel.getPreferredSize();
    if (d != null && d.equals(pref)) {
      return;
    }

    setInactiveStateImage(null);

    myLabel.invalidate();

    if (myActionPanel != null) {
      myActionPanel.invalidate();
    }

    myTabs.revalidateAndRepaint(false);
  }
Esempio n. 2
0
  public void setTabActions(ActionGroup group) {
    removeOldActionPanel();

    if (group == null) return;

    myActionPanel =
        new ActionPanel(
            myTabs,
            myInfo,
            new Pass<MouseEvent>() {
              public void pass(final MouseEvent event) {
                final MouseEvent me =
                    SwingUtilities.convertMouseEvent(event.getComponent(), event, TabLabel.this);
                processMouseEvent(me);
              }
            });

    toggleShowActions(false);

    add(myActionPanel, BorderLayout.EAST);

    myTabs.revalidateAndRepaint(false);
  }