示例#1
0
  private void updateUIWithFindModel() {
    boolean needToResetSearchFocus = mySearchTextComponent.hasFocus();
    boolean needToResetReplaceFocus = myReplaceTextComponent.hasFocus();
    updateSearchComponent();
    updateReplaceComponent();
    if (myFindModel.isReplaceState()) {
      if (myReplaceFieldWrapper.getParent() == null) {
        myLeftPanel.add(myReplaceFieldWrapper, BorderLayout.CENTER);
      }
      if (myReplaceToolbarWrapper.getParent() == null) {
        myRightPanel.add(myReplaceToolbarWrapper, BorderLayout.CENTER);
      }
      if (needToResetReplaceFocus) {
        myReplaceTextComponent.requestFocusInWindow();
      }
    } else {
      if (myReplaceFieldWrapper.getParent() != null) {
        myLeftPanel.remove(myReplaceFieldWrapper);
      }
      if (myReplaceToolbarWrapper.getParent() != null) {
        myRightPanel.remove(myReplaceToolbarWrapper);
      }
    }
    if (needToResetSearchFocus) mySearchTextComponent.requestFocusInWindow();
    mySearchActionsToolbar1.updateActionsImmediately();
    mySearchActionsToolbar2.updateActionsImmediately();
    myReplaceActionsToolbar1.updateActionsImmediately();
    myReplaceActionsToolbar2.updateActionsImmediately();
    myReplaceToolbarWrapper.revalidate();
    revalidate();
    repaint();

    myLivePreviewController.setTrackingSelection(!myFindModel.isGlobal());
  }
 public void setValue(String key, JComponent value) {
   JPanel p = keyValueComponentMap.get(key);
   p.removeAll();
   p.add(value);
   p.add(Box.createHorizontalGlue());
   p.repaint();
   p.getParent().repaint();
 }
 protected final void showProgress(String message) {
   myProgressMessage.setText(message);
   if (myProgressPanel.getParent() == null) {
     myGlassLayer.setEnabled(false);
     myProgressIcon.resume();
     myLayeredPane.add(myProgressPanel, LAYER_PROGRESS);
     myLayeredPane.repaint();
   }
 }
 public MyComponent() {
   myOverrideLAFFonts.addActionListener(
       new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
           updateCombo();
         }
       });
   if (!Registry.is("ide.transparency.mode.for.windows")) {
     myTransparencyPanel.getParent().remove(myTransparencyPanel);
   }
 }
示例#5
0
 private void handleCardComponentChange(Component component) {
   tabbedPane.setPreferredSize(component.getPreferredSize());
   tabbedPane.getParent().invalidate();
   tabbedPane.getParent().validate();
   tabbedPane.getParent().repaint();
 }