mengao
7 years ago
8 changed files with 64 additions and 40 deletions
@ -0,0 +1,30 @@ |
|||||||
|
package com.fr.plugin.chart.designer; |
||||||
|
|
||||||
|
import com.fr.design.gui.iscrollbar.UIScrollBar; |
||||||
|
import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane; |
||||||
|
|
||||||
|
import javax.swing.*; |
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by mengao on 2017/8/11. |
||||||
|
*/ |
||||||
|
public abstract class AbstractVanChartTabPane<T> extends AbstractChartTabPane<T> { |
||||||
|
|
||||||
|
protected void layoutContentPane() { |
||||||
|
leftcontentPane = createContentPane(); |
||||||
|
leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, original)); |
||||||
|
this.add(leftcontentPane); |
||||||
|
} |
||||||
|
|
||||||
|
protected void setLeftContentPaneBouns (Container parent, UIScrollBar scrollBar, int beginY, int maxheight) { |
||||||
|
int width = parent.getWidth(); |
||||||
|
int height = parent.getHeight(); |
||||||
|
if (leftcontentPane.getPreferredSize().height > maxheight) { |
||||||
|
leftcontentPane.setBounds(0, -beginY, width - scrollBar.getWidth(), height + beginY); |
||||||
|
scrollBar.setBounds(width - scrollBar.getWidth() - 1, 0, scrollBar.getWidth(), height); |
||||||
|
} else { |
||||||
|
leftcontentPane.setBounds(0, 0, width, height); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue