Browse Source

代码优化

master
mengao 7 years ago
parent
commit
ffb075c5e1
  1. 9
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

9
designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -1,12 +1,9 @@
package com.fr.design.gui.ibutton;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import sun.swing.SwingUtilities2;
@ -200,11 +197,7 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
if (isPressed(b)) {
g.setColor(Color.white);
} else {
if (b.isEnabled()) {
g.setColor(Color.black);
} else {
g.setColor(UIConstants.LINE_COLOR);
}
g.setColor(b.isEnabled() ? Color.black : UIConstants.LINE_COLOR);
}
SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemonicIndex, textRec.x + getTextShiftOffset(), textRec.y + fm.getAscent() + getTextShiftOffset());

Loading…
Cancel
Save