Ejemplo 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);
  }
Ejemplo 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);
  }