Browse Source

Merge pull request #979 in BA/design from ~XIAOXIA/design:9.0 to 9.0

* commit '88813c4862de401a6beffee059a888d6b08bcac6':
  有插件注册时,alphafine搜索框丢失
  alphafine 修改搜索框弹出逻辑
master
superman 8 years ago
parent
commit
730b3c1f0b
  1. 11
      designer/src/com/fr/design/mainframe/alphafine/AlphaFineHelper.java
  2. 28
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  3. 6
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java

11
designer/src/com/fr/design/mainframe/alphafine/AlphaFineHelper.java

@ -21,15 +21,22 @@ import java.util.List;
public class AlphaFineHelper {
public static final NoResultModel NO_RESULT_MODEL = new NoResultModel(Inter.getLocText("FR-Designer_AlphaFine_NoResult"));
public static final NoResultModel NO_CONNECTION_MODEL = new NoResultModel(Inter.getLocText("FR-Designer_ConnectionFailed"));
private static AlphaFineDialog alphaFineDialog;
/**
* 弹出alphafine搜索面板
*/
public static void showAlphaFineDialog(boolean forceOpen) {
AlphaFineDialog dialog = new AlphaFineDialog(DesignerContext.getDesignerFrame(), forceOpen);
if (alphaFineDialog == null) {
alphaFineDialog = new AlphaFineDialog(DesignerContext.getDesignerFrame(), forceOpen);
alphaFineDialog.setVisible(true);
final AlphaFineConfigManager manager = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager();
manager.setNeedRemind(false);
dialog.setVisible(true);
} else {
alphaFineDialog.setVisible(!alphaFineDialog.isVisible());
}
}

28
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -69,6 +69,7 @@ public class AlphaFineDialog extends UIDialog {
private static final String DS_NAME = "dsname=\"";
private static final String PLUGIN_MARK_SHORT = "k:4 ";
private static final String PLUGIN_MARK = "k:shop ";
private static final String PLACE_HOLDER = "AlphaFine";
private AlphaFineTextField searchTextField;
private UIButton closeButton;
@ -171,7 +172,7 @@ public class AlphaFineDialog extends UIDialog {
* 初始化输入框
*/
private void initSearchTextField() {
searchTextField = new AlphaFineTextField("AlphaFine");
searchTextField = new AlphaFineTextField(PLACE_HOLDER);
initTextFieldKeyListener();
searchTextField.setFont(AlphaFineConstants.GREATER_FONT);
searchTextField.setBackground(Color.white);
@ -235,7 +236,30 @@ public class AlphaFineDialog extends UIDialog {
}
boolean isNeedSearch(String text) {
return ComparatorUtils.equals("AlphaFine", text) || text.contains("'");
return ComparatorUtils.equals(PLACE_HOLDER, text) || text.contains("'");
}
@Override
public void setVisible(boolean isVisible) {
if (!isVisible) {
dispose();
return;
}
super.setVisible(isVisible);
}
@Override
public void dispose() {
resetDialog();
super.dispose();
}
/**
* 重置搜索框
*/
private void resetDialog() {
removeSearchResult();
searchTextField.setText(null);
}
/**

6
designer_base/src/com/fr/design/mainframe/DesignerFrame.java

@ -200,9 +200,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
}
});
refreshNorthEastPane(northEastPane, ad);
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) {
northEastPane.add(ad.createAlphafinePane(), BorderLayout.CENTER);
}
return northEastPane;
}
@ -214,6 +211,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
processor = new DefaultTitlePlace();
}
processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane());
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) {
northEastPane.add(ad.createAlphafinePane(), BorderLayout.CENTER);
}
}
public DesignerFrame(ToolBarMenuDock ad) {

Loading…
Cancel
Save