forked from fanruan/design
kerry
7 years ago
29 changed files with 150 additions and 87 deletions
@ -0,0 +1,32 @@
|
||||
package com.fr.plugin.chart.designer.component.format; |
||||
|
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.style.FormatPane; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by mengao on 2017/8/28. |
||||
*/ |
||||
public class FormatPaneWithOutFont extends FormatPane { |
||||
private static final int HEIGHT = 30; |
||||
|
||||
|
||||
protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, JPanel typePane) { |
||||
return new Component[][]{ |
||||
new Component[]{null, null}, |
||||
new Component[]{new UILabel(Inter.getLocText("FR-Base_Format"), SwingConstants.LEFT), typePane}, |
||||
new Component[]{centerPane, null}, |
||||
}; |
||||
} |
||||
|
||||
public Dimension getPreferredSize() { |
||||
//todo @mango
|
||||
if (getTypeComboBox().getSelectedIndex() == 0) { |
||||
return new Dimension((int)getTypeComboBox().getPreferredSize().getWidth(), HEIGHT); |
||||
} |
||||
return super.getPreferredSize(); |
||||
} |
||||
} |
Loading…
Reference in new issue