Browse Source

Merge pull request #137 in BA/design from ~XIAOHU/design:dev to dev

* commit 'e267b9212b484e3f0046721ffb1bad27aa7eaf22':
  打開多種佈局方式
  old plugin level
  api level
master
superman 9 years ago
parent
commit
8a52d96d84
  1. 10
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java
  2. 7
      designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java

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

@ -1,12 +1,6 @@
package com.fr.design.gui.ibutton; package com.fr.design.gui.ibutton;
import java.awt.BorderLayout; import java.awt.*;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@ -174,7 +168,7 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
return BorderFactory.createEmptyBorder(1, 1, 1, 1); return BorderFactory.createEmptyBorder(1, 1, 1, 1);
} }
protected GridLayout getGridLayout(int number) { protected LayoutManager getGridLayout(int number) {
return new GridLayout(0, number, 1, 0); return new GridLayout(0, number, 1, 0);
} }

7
designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java

@ -1,9 +1,6 @@
package com.fr.design.gui.ibutton; package com.fr.design.gui.ibutton;
import java.awt.Graphics; import java.awt.*;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import java.awt.RenderingHints;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Icon; import javax.swing.Icon;
@ -38,7 +35,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
} }
@Override @Override
protected GridLayout getGridLayout(int number) { protected LayoutManager getGridLayout(int number) {
if (number < BUTTON_NUMBER || isOneLineTab) { if (number < BUTTON_NUMBER || isOneLineTab) {
return super.getGridLayout(number); return super.getGridLayout(number);
} else if (number == BUTTON_NUMBER || number == SEVEN_NUMBER) { } else if (number == BUTTON_NUMBER || number == SEVEN_NUMBER) {

Loading…
Cancel
Save