Browse Source

打開多種佈局方式

master
xiaohu 9 years ago
parent
commit
3594600c0d
  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;
import java.awt.BorderLayout;
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.*;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@ -174,7 +168,7 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
return BorderFactory.createEmptyBorder(1, 1, 1, 1);
}
protected GridLayout getGridLayout(int number) {
protected LayoutManager getGridLayout(int number) {
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;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import java.awt.RenderingHints;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.Icon;
@ -38,7 +35,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
}
@Override
protected GridLayout getGridLayout(int number) {
protected LayoutManager getGridLayout(int number) {
if (number < BUTTON_NUMBER || isOneLineTab) {
return super.getGridLayout(number);
} else if (number == BUTTON_NUMBER || number == SEVEN_NUMBER) {

Loading…
Cancel
Save