hzzz 8 years ago
parent
commit
844a9a8669
  1. 2
      designer/src/com/fr/design/mainframe/FormatBrushAction.java
  2. 16
      designer_base/src/com/fr/design/gui/autocomplete/AutoCompletePopupWindow.java
  3. 178
      designer_base/src/com/fr/design/gui/autocomplete/AutoCompletion.java
  4. 4
      designer_base/src/com/fr/design/gui/autocomplete/ParameterizedCompletionContext.java
  5. 10
      designer_base/src/com/fr/design/gui/itabpane/UITabsHeaderIconPane.java
  6. 6
      designer_base/src/com/fr/design/gui/itree/checkboxtree/CheckBoxTree.java
  7. 2
      designer_base/src/com/fr/design/locale/designer.properties
  8. 2
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  9. 2
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  10. 2
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  11. 2
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  12. 2
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  13. 5
      designer_form/src/com/fr/design/mainframe/widget/editors/DataTableConfigPane.java

2
designer/src/com/fr/design/mainframe/FormatBrushAction.java

@ -50,7 +50,7 @@ public class FormatBrushAction extends ElementCaseAction {
//判断是不是连续区域 //判断是不是连续区域
//荣国是连续区域,那么这些长方形的长加起来应该等于 //荣国是连续区域,那么这些长方形的长加起来应该等于
if (!isContinueArea()) { if (!isContinueArea()) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Can_not_use_FormatBursh")); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Can_not_use_FormatBursh"));
ePane.setFormatState(DesignerContext.FORMAT_STATE_NULL); ePane.setFormatState(DesignerContext.FORMAT_STATE_NULL);
ePane.getFormatBrush().setSelected(false); ePane.getFormatBrush().setSelected(false);
return false; return false;

16
designer_base/src/com/fr/design/gui/autocomplete/AutoCompletePopupWindow.java

@ -179,7 +179,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
} else { } else {
doAutocomplete(); doAutocomplete();
} }
} else if (AutoCompletion.getDebug()) { } else if (AutoCompletion.isDebug()) {
Thread.dumpStack(); Thread.dumpStack();
} }
} }
@ -300,7 +300,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
*/ */
private void installKeyBindings() { private void installKeyBindings() {
if (AutoCompletion.getDebug()) { if (AutoCompletion.isDebug()) {
System.out.println("PopupWindow: Installing keybindings"); System.out.println("PopupWindow: Installing keybindings");
} }
@ -313,7 +313,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
ActionMap am = comp.getActionMap(); ActionMap am = comp.getActionMap();
replaceAction(im, am, KeyEvent.VK_ESCAPE, escapeKap, oldEscape); replaceAction(im, am, KeyEvent.VK_ESCAPE, escapeKap, oldEscape);
if (AutoCompletion.getDebug() && oldEscape.action == escapeKap.action) { if (AutoCompletion.isDebug() && oldEscape.action == escapeKap.action) {
Thread.dumpStack(); Thread.dumpStack();
} }
replaceAction(im, am, KeyEvent.VK_UP, upKap, oldUp); replaceAction(im, am, KeyEvent.VK_UP, upKap, oldUp);
@ -371,7 +371,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
*/ */
private void positionDescWindow() { private void positionDescWindow() {
boolean showDescWindow = descWindow != null && ac.getShowDescWindow(); boolean showDescWindow = descWindow != null && ac.isShowDescWindow();
if (!showDescWindow) { if (!showDescWindow) {
return; return;
} }
@ -604,7 +604,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
Rectangle screenBounds = Util.getScreenBoundsForPoint(r.x, r.y); Rectangle screenBounds = Util.getScreenBoundsForPoint(r.x, r.y);
//Dimension screenSize = getToolkit().getScreenSize(); //Dimension screenSize = getToolkit().getScreenSize();
boolean showDescWindow = descWindow != null && ac.getShowDescWindow(); boolean showDescWindow = descWindow != null && ac.isShowDescWindow();
int totalH = getHeight(); int totalH = getHeight();
if (showDescWindow) { if (showDescWindow) {
totalH = Math.max(totalH, descWindow.getHeight()); totalH = Math.max(totalH, descWindow.getHeight());
@ -655,7 +655,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
installKeyBindings(); installKeyBindings();
lastLine = ac.getLineOfCaret(); lastLine = ac.getLineOfCaret();
selectFirstItem(); selectFirstItem();
if (descWindow == null && ac.getShowDescWindow()) { if (descWindow == null && ac.isShowDescWindow()) {
descWindow = createDescriptionWindow(); descWindow = createDescriptionWindow();
positionDescWindow(); positionDescWindow();
} }
@ -693,7 +693,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
// because of the way child JWindows' visibility is handled - in // because of the way child JWindows' visibility is handled - in
// some ways it's dependent on the parent, in other ways it's not. // some ways it's dependent on the parent, in other ways it's not.
if (descWindow != null) { if (descWindow != null) {
descWindow.setVisible(visible && ac.getShowDescWindow()); descWindow.setVisible(visible && ac.isShowDescWindow());
} }
} }
@ -708,7 +708,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
*/ */
private void uninstallKeyBindings() { private void uninstallKeyBindings() {
if (AutoCompletion.getDebug()) { if (AutoCompletion.isDebug()) {
System.out.println("PopupWindow: Removing keybindings"); System.out.println("PopupWindow: Removing keybindings");
} }

178
designer_base/src/com/fr/design/gui/autocomplete/AutoCompletion.java

@ -8,17 +8,17 @@
*/ */
package com.fr.design.gui.autocomplete; package com.fr.design.gui.autocomplete;
import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.List;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.CaretEvent; import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener; import javax.swing.event.CaretListener;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import javax.swing.text.*; import javax.swing.text.*;
import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.List;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
@ -26,10 +26,10 @@ import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_M
/** /**
* Adds auto-completion to a text component. Provides a popup window with a * Adds auto-completion to a text component. Provides a popup window with a
* list of auto-complete choices on a given keystroke, such as Crtrl+Space.<p> * list of auto-complete choices on a given keystroke, such as Crtrl+Space.<p>
* * <p>
* Depending on the {@link CompletionProvider} installed, the following * Depending on the {@link CompletionProvider} installed, the following
* auto-completion features may be enabled: * auto-completion features may be enabled:
* * <p>
* <ul> * <ul>
* <li>An auto-complete choices list made visible via e.g. Ctrl+Space</li> * <li>An auto-complete choices list made visible via e.g. Ctrl+Space</li>
* <li>A "description" window displayed alongside the choices list that * <li>A "description" window displayed alongside the choices list that
@ -214,7 +214,7 @@ public class AutoCompletion {
* Stores how to render auto-completion-specific highlights in text * Stores how to render auto-completion-specific highlights in text
* components. * components.
*/ */
private static final AutoCompletionStyleContext styleContext = private static final AutoCompletionStyleContext STYLE_CONTEXT =
new AutoCompletionStyleContext(); new AutoCompletionStyleContext();
/** /**
@ -297,7 +297,7 @@ public class AutoCompletion {
* *
* @return Whether debug is enabled. * @return Whether debug is enabled.
*/ */
static boolean getDebug() { static boolean isDebug() {
return DEBUG; return DEBUG;
} }
@ -398,7 +398,7 @@ public class AutoCompletion {
* @return Whether the description window should be shown. * @return Whether the description window should be shown.
* @see #setShowDescWindow(boolean) * @see #setShowDescWindow(boolean)
*/ */
public boolean getShowDescWindow() { public boolean isShowDescWindow() {
return showDescWindow; return showDescWindow;
} }
@ -410,7 +410,7 @@ public class AutoCompletion {
* @return The style context. * @return The style context.
*/ */
public static AutoCompletionStyleContext getStyleContext() { public static AutoCompletionStyleContext getStyleContext() {
return styleContext; return STYLE_CONTEXT;
} }
@ -433,7 +433,7 @@ public class AutoCompletion {
* we are not installed on one. * we are not installed on one.
*/ */
ComponentOrientation getTextComponentOrientation() { ComponentOrientation getTextComponentOrientation() {
return textComponent==null ? null : return textComponent == null ? null :
textComponent.getComponentOrientation(); textComponent.getComponentOrientation();
} }
@ -468,7 +468,7 @@ public class AutoCompletion {
* @return Whether any such windows were visible (and thus hidden). * @return Whether any such windows were visible (and thus hidden).
*/ */
private boolean hideParameterCompletionPopups() { private boolean hideParameterCompletionPopups() {
if (pcc!=null) { if (pcc != null) {
pcc.deactivate(); pcc.deactivate();
pcc = null; pcc = null;
return true; return true;
@ -483,7 +483,7 @@ public class AutoCompletion {
* @return Whether the popup window was visible. * @return Whether the popup window was visible.
*/ */
private boolean hidePopupWindow() { private boolean hidePopupWindow() {
if (popupWindow!=null) { if (popupWindow != null) {
if (popupWindow.isVisible()) { if (popupWindow.isVisible()) {
popupWindow.setVisible(false); popupWindow.setVisible(false);
return true; return true;
@ -540,7 +540,7 @@ public class AutoCompletion {
int dot = caret.getDot(); int dot = caret.getDot();
int len = alreadyEntered.length(); int len = alreadyEntered.length();
int start = dot-len; int start = dot - len;
String replacement = getReplacementText(c, textComp.getDocument(), String replacement = getReplacementText(c, textComp.getDocument(),
start, len); start, len);
@ -550,7 +550,7 @@ public class AutoCompletion {
if (isParameterAssistanceEnabled() && if (isParameterAssistanceEnabled() &&
(c instanceof ParameterizedCompletion)) { (c instanceof ParameterizedCompletion)) {
ParameterizedCompletion pc = (ParameterizedCompletion)c; ParameterizedCompletion pc = (ParameterizedCompletion) c;
startParameterizedCompletionAssistance(pc, typedParamListStartChar); startParameterizedCompletionAssistance(pc, typedParamListStartChar);
} }
@ -567,7 +567,7 @@ public class AutoCompletion {
*/ */
public void install(JTextComponent c) { public void install(JTextComponent c) {
if (textComponent!=null) { if (textComponent != null) {
uninstall(); uninstall();
} }
@ -581,7 +581,7 @@ public class AutoCompletion {
// hoses ctrl+space, shift+space, etc., even though I think it // hoses ctrl+space, shift+space, etc., even though I think it
// shouldn't... // shouldn't...
char start = provider.getParameterListStart(); char start = provider.getParameterListStart();
if (start!=0 && start!=' ') { if (start != 0 && start != ' ') {
InputMap im = c.getInputMap(); InputMap im = c.getInputMap();
ActionMap am = c.getActionMap(); ActionMap am = c.getActionMap();
KeyStroke ks = KeyStroke.getKeyStroke(start); KeyStroke ks = KeyStroke.getKeyStroke(start);
@ -666,7 +666,7 @@ public class AutoCompletion {
* @return Whether the completion popup window is visible. * @return Whether the completion popup window is visible.
*/ */
public boolean isPopupVisible() { public boolean isPopupVisible() {
return popupWindow!=null && popupWindow.isVisible(); return popupWindow != null && popupWindow.isVisible();
} }
@ -681,60 +681,32 @@ public class AutoCompletion {
* @return The current line number of the caret. * @return The current line number of the caret.
*/ */
protected int refreshPopupWindow() { protected int refreshPopupWindow() {
// A return value of null => don't suggest completions // A return value of null => don't suggest completions
String text = provider.getAlreadyEnteredText(textComponent); String text = provider.getAlreadyEnteredText(textComponent);
if (text==null && !isPopupVisible()) { if (text == null && !isPopupVisible()) {
return getLineOfCaret(); return getLineOfCaret();
} }
// If the popup is currently visible, and they type a space (or any // If the popup is currently visible, and they type a space (or any
// character that resets the completion list to "all completions"), // character that resets the completion list to "all completions"),
// the popup window should be hidden instead of being reset to show // the popup window should be hidden instead of being reset to show
// everything. // everything.
int textLen = text==null ? 0 : text.length(); int textLen = text == null ? 0 : text.length();
if (textLen==0) { if (textLen == 0 && isPopupVisible()) {
if (isPopupVisible()) {
hidePopupWindow(); hidePopupWindow();
return getLineOfCaret(); return getLineOfCaret();
} }
} final List<Completion> completions = provider.getCompletions(textComponent);
final List<Completion> completions = provider.
getCompletions(textComponent);
int count = completions.size(); int count = completions.size();
if (needSetPopupWindow(count, textLen)) {
if (count>1 || (count==1 && (isPopupVisible() || textLen==0)) || if (popupWindow == null) {
(count==1 && !getAutoCompleteSingleChoices())) { popupWindow = createAutoCompletePopupWindow();
if (popupWindow==null) {
popupWindow = new AutoCompletePopupWindow(parentWindow, this);
// Completion is usually done for code, which is always done
// LTR, so make completion stuff RTL only if text component is
// also RTL.
popupWindow.applyComponentOrientation(
getTextComponentOrientation());
if (renderer!=null) {
popupWindow.setListCellRenderer(renderer);
}
if (preferredChoicesWindowSize!=null) {
popupWindow.setSize(preferredChoicesWindowSize);
}
if (preferredDescWindowSize!=null) {
popupWindow.setDescriptionWindowSize(
preferredDescWindowSize);
}
} }
popupWindow.setCompletions(completions); popupWindow.setCompletions(completions);
if (!popupWindow.isVisible()) { if (!popupWindow.isVisible()) {
Rectangle r = null; Rectangle r = null;
try { try {
r = textComponent.modelToView(textComponent. r = textComponent.modelToView(textComponent.getCaretPosition());
getCaretPosition());
} catch (BadLocationException ble) { } catch (BadLocationException ble) {
return -1; return -1;
} }
Point p = new Point(r.x, r.y); Point p = new Point(r.x, r.y);
@ -744,25 +716,43 @@ public class AutoCompletion {
popupWindow.setLocationRelativeTo(r); popupWindow.setLocationRelativeTo(r);
popupWindow.setVisible(true); popupWindow.setVisible(true);
} }
} else if (count == 1) { // !isPopupVisible && autoCompleteSingleChoices
}
else if (count==1) { // !isPopupVisible && autoCompleteSingleChoices
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
public void run() { public void run() {
insertCompletion(completions.get(0)); insertCompletion(completions.get(0));
} }
}); });
} } else {
else {
hidePopupWindow(); hidePopupWindow();
} }
return getLineOfCaret(); return getLineOfCaret();
}
private boolean needSetPopupWindow(int count, int textLen) {
return (count == 1 && (isPopupVisible() || textLen == 0))
|| (count == 1 && !getAutoCompleteSingleChoices())
|| count > 1;
} }
private AutoCompletePopupWindow createAutoCompletePopupWindow() {
AutoCompletePopupWindow popupWindow = new AutoCompletePopupWindow(parentWindow, this);
// Completion is usually done for code, which is always done
// LTR, so make completion stuff RTL only if text component is
// also RTL.
popupWindow.applyComponentOrientation(
getTextComponentOrientation());
if (renderer != null) {
popupWindow.setListCellRenderer(renderer);
}
if (preferredChoicesWindowSize != null) {
popupWindow.setSize(preferredChoicesWindowSize);
}
if (preferredDescWindowSize != null) {
popupWindow.setDescriptionWindowSize(
preferredDescWindowSize);
}
return popupWindow;
}
/** /**
* Sets the delay between when the user types a character and when the * Sets the delay between when the user types a character and when the
@ -787,13 +777,12 @@ public class AutoCompletion {
* @see #setAutoActivationDelay(int) * @see #setAutoActivationDelay(int)
*/ */
public void setAutoActivationEnabled(boolean enabled) { public void setAutoActivationEnabled(boolean enabled) {
if (enabled!=autoActivationEnabled) { if (enabled != autoActivationEnabled) {
autoActivationEnabled = enabled; autoActivationEnabled = enabled;
if (textComponent!=null) { if (textComponent != null) {
if (autoActivationEnabled) { if (autoActivationEnabled) {
autoActivationListener.addTo(textComponent); autoActivationListener.addTo(textComponent);
} } else {
else {
autoActivationListener.removeFrom(textComponent); autoActivationListener.removeFrom(textComponent);
} }
} }
@ -808,7 +797,7 @@ public class AutoCompletion {
* @see #isAutoCompleteEnabled() * @see #isAutoCompleteEnabled()
*/ */
public void setAutoCompleteEnabled(boolean enabled) { public void setAutoCompleteEnabled(boolean enabled) {
if (enabled!=autoCompleteEnabled) { if (enabled != autoCompleteEnabled) {
autoCompleteEnabled = enabled; autoCompleteEnabled = enabled;
hidePopupWindow(); hidePopupWindow();
} }
@ -836,7 +825,7 @@ public class AutoCompletion {
* <code>null</code>. * <code>null</code>.
*/ */
public void setCompletionProvider(CompletionProvider provider) { public void setCompletionProvider(CompletionProvider provider) {
if (provider==null) { if (provider == null) {
throw new IllegalArgumentException("provider cannot be null"); throw new IllegalArgumentException("provider cannot be null");
} }
this.provider = provider; this.provider = provider;
@ -853,7 +842,7 @@ public class AutoCompletion {
*/ */
public void setChoicesWindowSize(int w, int h) { public void setChoicesWindowSize(int w, int h) {
preferredChoicesWindowSize = new Dimension(w, h); preferredChoicesWindowSize = new Dimension(w, h);
if (popupWindow!=null) { if (popupWindow != null) {
popupWindow.setSize(preferredChoicesWindowSize); popupWindow.setSize(preferredChoicesWindowSize);
} }
} }
@ -868,7 +857,7 @@ public class AutoCompletion {
*/ */
public void setDescriptionWindowSize(int w, int h) { public void setDescriptionWindowSize(int w, int h) {
preferredDescWindowSize = new Dimension(w, h); preferredDescWindowSize = new Dimension(w, h);
if (popupWindow!=null) { if (popupWindow != null) {
popupWindow.setDescriptionWindowSize(preferredDescWindowSize); popupWindow.setDescriptionWindowSize(preferredDescWindowSize);
} }
} }
@ -915,7 +904,7 @@ public class AutoCompletion {
*/ */
public void setListCellRenderer(ListCellRenderer renderer) { public void setListCellRenderer(ListCellRenderer renderer) {
this.renderer = renderer; this.renderer = renderer;
if (popupWindow!=null) { if (popupWindow != null) {
popupWindow.setListCellRenderer(renderer); popupWindow.setListCellRenderer(renderer);
hidePopupWindow(); hidePopupWindow();
} }
@ -957,7 +946,7 @@ public class AutoCompletion {
* completion window. * completion window.
* *
* @param show Whether to show the description window. * @param show Whether to show the description window.
* @see #getShowDescWindow() * @see #isShowDescWindow()
*/ */
public void setShowDescWindow(boolean show) { public void setShowDescWindow(boolean show) {
hidePopupWindow(); // Needed to force it to take effect hidePopupWindow(); // Needed to force it to take effect
@ -974,11 +963,11 @@ public class AutoCompletion {
* @see #getTriggerKey() * @see #getTriggerKey()
*/ */
public void setTriggerKey(KeyStroke ks) { public void setTriggerKey(KeyStroke ks) {
if (ks==null) { if (ks == null) {
throw new IllegalArgumentException("trigger key cannot be null"); throw new IllegalArgumentException("trigger key cannot be null");
} }
if (!ks.equals(trigger)) { if (!ks.equals(trigger)) {
if (textComponent!=null) { if (textComponent != null) {
// Put old trigger action back. // Put old trigger action back.
uninstallTriggerKey(); uninstallTriggerKey();
// Grab current action for new trigger and replace it. // Grab current action for new trigger and replace it.
@ -1004,17 +993,16 @@ public class AutoCompletion {
// Don't bother with a tool tip if there are no parameters, but if // Don't bother with a tool tip if there are no parameters, but if
// they typed e.g. the opening '(', make them overtype the ')'. // they typed e.g. the opening '(', make them overtype the ')'.
if (pc.getParamCount()==0 && !(pc instanceof TemplateCompletion)) { if (pc.getParamCount() == 0 && !(pc instanceof TemplateCompletion)) {
CompletionProvider p = pc.getProvider(); CompletionProvider p = pc.getProvider();
char end = p.getParameterListEnd(); // Might be '\0' char end = p.getParameterListEnd(); // Might be '\0'
String text = end=='\0' ? "" : Character.toString(end); String text = end == '\0' ? "" : Character.toString(end);
if (typedParamListStartChar) { if (typedParamListStartChar) {
String template = "${}" + text + "${cursor}"; String template = "${}" + text + "${cursor}";
textComponent.replaceSelection(Character.toString(p.getParameterListStart())); textComponent.replaceSelection(Character.toString(p.getParameterListStart()));
TemplateCompletion tc = new TemplateCompletion(p, null, null, template); TemplateCompletion tc = new TemplateCompletion(p, null, null, template);
pc = tc; pc = tc;
} } else {
else {
text = p.getParameterListStart() + text; text = p.getParameterListStart() + text;
textComponent.replaceSelection(text); textComponent.replaceSelection(text);
return; return;
@ -1035,7 +1023,7 @@ public class AutoCompletion {
*/ */
public void uninstall() { public void uninstall() {
if (textComponent!=null) { if (textComponent != null) {
hidePopupWindow(); // Unregisters listeners, actions, etc. hidePopupWindow(); // Unregisters listeners, actions, etc.
@ -1043,7 +1031,7 @@ public class AutoCompletion {
// Uninstall the function completion key. // Uninstall the function completion key.
char start = provider.getParameterListStart(); char start = provider.getParameterListStart();
if (start!=0) { if (start != 0) {
KeyStroke ks = KeyStroke.getKeyStroke(start); KeyStroke ks = KeyStroke.getKeyStroke(start);
InputMap im = textComponent.getInputMap(); InputMap im = textComponent.getInputMap();
im.put(ks, oldParenKey); im.put(ks, oldParenKey);
@ -1052,7 +1040,7 @@ public class AutoCompletion {
} }
textComponentListener.removeFrom(textComponent); textComponentListener.removeFrom(textComponent);
if (parentWindow!=null) { if (parentWindow != null) {
parentWindowListener.removeFrom(parentWindow); parentWindowListener.removeFrom(parentWindow);
} }
@ -1090,15 +1078,15 @@ public class AutoCompletion {
* at runtime. * at runtime.
*/ */
private void updateUI() { private void updateUI() {
if (popupWindow!=null) { if (popupWindow != null) {
popupWindow.updateUI(); popupWindow.updateUI();
} }
if (pcc!=null) { if (pcc != null) {
pcc.updateUI(); pcc.updateUI();
} }
// Will practically always be a JComponent (a JLabel) // Will practically always be a JComponent (a JLabel)
if (paramChoicesRenderer instanceof JComponent) { if (paramChoicesRenderer instanceof JComponent) {
((JComponent)paramChoicesRenderer).updateUI(); ((JComponent) paramChoicesRenderer).updateUI();
} }
} }
@ -1131,8 +1119,7 @@ public class AutoCompletion {
public void caretUpdate(CaretEvent e) { public void caretUpdate(CaretEvent e) {
if (justInserted) { if (justInserted) {
justInserted = false; justInserted = false;
} } else {
else {
timer.stop(); timer.stop();
} }
} }
@ -1150,16 +1137,14 @@ public class AutoCompletion {
public void insertUpdate(DocumentEvent e) { public void insertUpdate(DocumentEvent e) {
justInserted = false; justInserted = false;
if (isAutoCompleteEnabled() && isAutoActivationEnabled() && if (isAutoCompleteEnabled() && isAutoActivationEnabled() &&
e.getLength()==1) { e.getLength() == 1) {
if (provider.isAutoActivateOkay(textComponent)) { if (provider.isAutoActivateOkay(textComponent)) {
timer.restart(); timer.restart();
justInserted = true; justInserted = true;
} } else {
else {
timer.stop(); timer.stop();
} }
} } else {
else {
timer.stop(); timer.stop();
} }
} }
@ -1188,8 +1173,7 @@ public class AutoCompletion {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (isAutoCompleteEnabled()) { if (isAutoCompleteEnabled()) {
refreshPopupWindow(); refreshPopupWindow();
} } else if (oldTriggerAction != null) {
else if (oldTriggerAction!=null) {
oldTriggerAction.actionPerformed(e); oldTriggerAction.actionPerformed(e);
} }
} }
@ -1323,11 +1307,11 @@ public class AutoCompletion {
Window oldParentWindow = parentWindow; Window oldParentWindow = parentWindow;
parentWindow = SwingUtilities.getWindowAncestor(textComponent); parentWindow = SwingUtilities.getWindowAncestor(textComponent);
if (parentWindow!=oldParentWindow) { if (parentWindow != oldParentWindow) {
if (oldParentWindow!=null) { if (oldParentWindow != null) {
parentWindowListener.removeFrom(oldParentWindow); parentWindowListener.removeFrom(oldParentWindow);
} }
if (parentWindow!=null) { if (parentWindow != null) {
parentWindowListener.addTo(parentWindow); parentWindowListener.addTo(parentWindow);
} }
} }

4
designer_base/src/com/fr/design/gui/autocomplete/ParameterizedCompletionContext.java

@ -439,7 +439,7 @@ class ParameterizedCompletionContext {
*/ */
private void installKeyBindings() { private void installKeyBindings() {
if (AutoCompletion.getDebug()) { if (AutoCompletion.isDebug()) {
System.out.println("CompletionContext: Installing keybindings"); System.out.println("CompletionContext: Installing keybindings");
} }
@ -733,7 +733,7 @@ class ParameterizedCompletionContext {
*/ */
private void uninstallKeyBindings() { private void uninstallKeyBindings() {
if (AutoCompletion.getDebug()) { if (AutoCompletion.isDebug()) {
System.out.println("CompletionContext Uninstalling keybindings"); System.out.println("CompletionContext Uninstalling keybindings");
} }

10
designer_base/src/com/fr/design/gui/itabpane/UITabsHeaderIconPane.java

@ -160,12 +160,14 @@ public class UITabsHeaderIconPane extends JPanel implements UITabComponent {
public void run() { public void run() {
int height = centerPane.getHeight(); int height = centerPane.getHeight();
int width = centerPane.getWidth(); int width = centerPane.getWidth();
int step = 30;
int x = 0;
int y = -height; int y = -height;
for (int i = 0; i <= height; i += 30) { for (int i = 0; i <= height; i += step) {
// 设置面板位置 // 设置面板位置
currentPanel.setBounds(0, i, width, height); currentPanel.setBounds(x, i, width, height);
panel.setBounds(0, y, width, height); panel.setBounds(x, y, width, height);
y += 30; y += step;
try { try {
Thread.sleep(3); Thread.sleep(3);
} catch (InterruptedException e) { } catch (InterruptedException e) {

6
designer_base/src/com/fr/design/gui/itree/checkboxtree/CheckBoxTree.java

@ -236,8 +236,9 @@ public class CheckBoxTree extends JTree {
} }
TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); TreePath path = _tree.getPathForLocation(e.getX(), e.getY());
if (path == null) if (path == null) {
return null; return null;
}
if (clicksInCheckBox(e, path)) { if (clicksInCheckBox(e, path)) {
return path; return path;
@ -308,9 +309,10 @@ public class CheckBoxTree extends JTree {
return; return;
} }
if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) {
toggleSelections(); toggleSelections();
} }
}
public void keyTyped(KeyEvent e) { public void keyTyped(KeyEvent e) {
} }

2
designer_base/src/com/fr/design/locale/designer.properties

@ -1137,7 +1137,7 @@ FRFont-bold=bold
FR-Designer_Set_Submit_Condition= FR-Designer_Set_Submit_Condition=
Form-Change_Widget_Name=Change Widget Name Form-Change_Widget_Name=Change Widget Name
ReportColumns-Report_Columns=Report Columns ReportColumns-Report_Columns=Report Columns
Can_not_use_FormatBursh= FR-Designer_Can_not_use_FormatBursh=
CellElement-Property_Table=CellElement Property Table CellElement-Property_Table=CellElement Property Table
Dictionary-Dynamic_SQL=Dynamic SQL Dictionary-Dynamic_SQL=Dynamic SQL
FR-Designer_Form-CheckBoxGroup=CheckBoxGroup FR-Designer_Form-CheckBoxGroup=CheckBoxGroup

2
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -1138,7 +1138,7 @@ FRFont-bold=Bold
FR-Designer_Set_Submit_Condition=Submit Condition FR-Designer_Set_Submit_Condition=Submit Condition
Form-Change_Widget_Name=Change Control Name Form-Change_Widget_Name=Change Control Name
ReportColumns-Report_Columns=Multi-columns/lines display ReportColumns-Report_Columns=Multi-columns/lines display
Can_not_use_FormatBursh=Can't use format painter in multiple selections FR-Designer_Can_not_use_FormatBursh=Can't use format painter in multiple selections
CellElement-Property_Table=Cell Attribute Table CellElement-Property_Table=Cell Attribute Table
Dictionary-Dynamic_SQL=Dynamic SQL Dictionary-Dynamic_SQL=Dynamic SQL
FR-Designer_Form-CheckBoxGroup=CheckBoxGroup FR-Designer_Form-CheckBoxGroup=CheckBoxGroup

2
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -1133,7 +1133,7 @@ FRFont-bold=\u592A\u5B57
FR-Designer_Set_Submit_Condition=\u63D0\u51FA\u6761\u4EF6\u3092\u8A2D\u5B9A FR-Designer_Set_Submit_Condition=\u63D0\u51FA\u6761\u4EF6\u3092\u8A2D\u5B9A
Form-Change_Widget_Name=\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u540D\u5909\u66F4 Form-Change_Widget_Name=\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u540D\u5909\u66F4
ReportColumns-Report_Columns=\u5E33\u7968\u30B3\u30E9\u30E0 ReportColumns-Report_Columns=\u5E33\u7968\u30B3\u30E9\u30E0
Can_not_use_FormatBursh=\u8907\u6570\u9078\u629E\u3057\u305F\u30A8\u30EA\u30A2\u3067\u306F\u66F8\u5F0F\u30D6\u30E9\u30B7\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\! FR-Designer_Can_not_use_FormatBursh=\u8907\u6570\u9078\u629E\u3057\u305F\u30A8\u30EA\u30A2\u3067\u306F\u66F8\u5F0F\u30D6\u30E9\u30B7\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\!
CellElement-Property_Table=\u30BB\u30EB\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u00B7\u30B7\u30FC\u30C8 CellElement-Property_Table=\u30BB\u30EB\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u00B7\u30B7\u30FC\u30C8
Dictionary-Dynamic_SQL=\u52D5\u614BSQL Dictionary-Dynamic_SQL=\u52D5\u614BSQL
FR-Designer_Form-CheckBoxGroup=\u30D5\u30EC\u30FC\u30E0\u30BB\u30C3\u30C8\u3092\u8907\u6570\u9078\u629E FR-Designer_Form-CheckBoxGroup=\u30D5\u30EC\u30FC\u30E0\u30BB\u30C3\u30C8\u3092\u8907\u6570\u9078\u629E

2
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -1134,7 +1134,7 @@ FRFont-bold=\uAD75\uAC8C
FR-Designer_Set_Submit_Condition=\uC81C\uCD9C\uC870\uAC74\uC124\uC815 FR-Designer_Set_Submit_Condition=\uC81C\uCD9C\uC870\uAC74\uC124\uC815
Form-Change_Widget_Name=\uC18C\uD504\uD2B8\uC6E8\uC5B4\uC81C\uC5B4\uC774\uB984\uBCC0\uACBD Form-Change_Widget_Name=\uC18C\uD504\uD2B8\uC6E8\uC5B4\uC81C\uC5B4\uC774\uB984\uBCC0\uACBD
ReportColumns-Report_Columns=\uBB38\uC11C\uC140\uB098\uB204\uAE30 ReportColumns-Report_Columns=\uBB38\uC11C\uC140\uB098\uB204\uAE30
Can_not_use_FormatBursh=\uC911\uBCF5\uC120\uD0DD\uB41C\uC601\uC5ED\uC5D0\uC11C\uC2DD\uC744\uC774\uC6A9\uD558\uC5EC\uC778\uC1C4\uD560\uC218\uC5C6\uC2B5\uB2C8\uB2E4.\! FR-Designer_Can_not_use_FormatBursh=\uC911\uBCF5\uC120\uD0DD\uB41C\uC601\uC5ED\uC5D0\uC11C\uC2DD\uC744\uC774\uC6A9\uD558\uC5EC\uC778\uC1C4\uD560\uC218\uC5C6\uC2B5\uB2C8\uB2E4.\!
CellElement-Property_Table=\uC140\uC18D\uC131\uD45C CellElement-Property_Table=\uC140\uC18D\uC131\uD45C
Dictionary-Dynamic_SQL=\uB3D9\uC801 SQL Dictionary-Dynamic_SQL=\uB3D9\uC801 SQL
FR-Designer_Form-CheckBoxGroup=\uCCB4\uD06C\uBC15\uC2A4\uADF8\uB8F9 FR-Designer_Form-CheckBoxGroup=\uCCB4\uD06C\uBC15\uC2A4\uADF8\uB8F9

2
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -1133,7 +1133,7 @@ FRFont-bold=\u52A0\u7C97
FR-Designer_Set_Submit_Condition=\u8BBE\u7F6E\u63D0\u4EA4\u6761\u4EF6 FR-Designer_Set_Submit_Condition=\u8BBE\u7F6E\u63D0\u4EA4\u6761\u4EF6
Form-Change_Widget_Name=\u66F4\u6539\u63A7\u4EF6\u540D Form-Change_Widget_Name=\u66F4\u6539\u63A7\u4EF6\u540D
ReportColumns-Report_Columns=\u62A5\u8868\u5206\u680F ReportColumns-Report_Columns=\u62A5\u8868\u5206\u680F
Can_not_use_FormatBursh=\u4E0D\u80FD\u5BF9\u591A\u91CD\u9009\u5B9A\u533A\u57DF\u4F7F\u7528\u683C\u5F0F\u5237\! FR-Designer_Can_not_use_FormatBursh=\u4E0D\u80FD\u5BF9\u591A\u91CD\u9009\u5B9A\u533A\u57DF\u4F7F\u7528\u683C\u5F0F\u5237\!
CellElement-Property_Table=\u5355\u5143\u683C\u5C5E\u6027\u8868 CellElement-Property_Table=\u5355\u5143\u683C\u5C5E\u6027\u8868
Dictionary-Dynamic_SQL=\u52A8\u6001SQL Dictionary-Dynamic_SQL=\u52A8\u6001SQL
FR-Designer_Form-CheckBoxGroup=\u590D\u9009\u6846\u7EC4 FR-Designer_Form-CheckBoxGroup=\u590D\u9009\u6846\u7EC4

2
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -1133,7 +1133,7 @@ FRFont-bold=\u7C97\u9AD4
FR-Designer_Set_Submit_Condition=\u8A2D\u5B9A\u63D0\u4EA4\u689D\u4EF6 FR-Designer_Set_Submit_Condition=\u8A2D\u5B9A\u63D0\u4EA4\u689D\u4EF6
Form-Change_Widget_Name=\u66F4\u6539\u63A7\u5236\u9805\u540D Form-Change_Widget_Name=\u66F4\u6539\u63A7\u5236\u9805\u540D
ReportColumns-Report_Columns=\u5831\u8868\u5206\u6B04 ReportColumns-Report_Columns=\u5831\u8868\u5206\u6B04
Can_not_use_FormatBursh=\u7121\u6CD5\u4F7F\u7528\u8907\u88FD\u683C\u5F0F FR-Designer_Can_not_use_FormatBursh=\u7121\u6CD5\u4F7F\u7528\u8907\u88FD\u683C\u5F0F
CellElement-Property_Table=\u5132\u5B58\u683C\u5C6C\u6027\u8868 CellElement-Property_Table=\u5132\u5B58\u683C\u5C6C\u6027\u8868
Dictionary-Dynamic_SQL=\u52D5\u614BSQL Dictionary-Dynamic_SQL=\u52D5\u614BSQL
FR-Designer_Form-CheckBoxGroup=\u5FA9\u9078\u6846\u7D44 FR-Designer_Form-CheckBoxGroup=\u5FA9\u9078\u6846\u7D44

5
designer_form/src/com/fr/design/mainframe/widget/editors/DataTableConfigPane.java

@ -223,10 +223,11 @@ public class DataTableConfigPane extends JComponent implements PropertyChangeLis
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (drag) { if (drag) {
int value = oldHeight + e.getY() - oldY; int value = oldHeight + e.getY() - oldY;
if (value < 30) if (value < 30) {
table.setRowHeight(row, 30); table.setRowHeight(row, 30);
else } else {
table.setRowHeight(row, oldHeight + e.getY() - oldY); table.setRowHeight(row, oldHeight + e.getY() - oldY);
}
DataTableConfigPane.this.propertyChange(); DataTableConfigPane.this.propertyChange();
} }
} }

Loading…
Cancel
Save