项目:swingx
文件:JXRootPane.java
/**
* {@inheritDoc}
*/
@Override
public void setLayout(LayoutManager layout) {
if (layout instanceof XRootLayout) {
// happens if decoration is uninstalled by ui
if ((layout != null) && (layout == getLayout())) {
((XRootLayout) layout).setLayoutManager(null);
}
super.setLayout(layout);
} else {
if (layout instanceof LayoutManager2) {
((XRootLayout) getLayout()).setLayoutManager((LayoutManager2) layout);
if (!isValid()) {
invalidate();
}
}
}
}
项目:aibench-project
文件:JXRootPane.java
@Override
public void setLayout(LayoutManager layout) {
if (layout instanceof XRootLayout) {
// happens if decoration is uninstalled by ui
if ((layout != null) && (layout == getLayout())) {
((XRootLayout) layout).setLayoutManager(null);
}
super.setLayout(layout);
} else {
if (layout instanceof LayoutManager2) {
((XRootLayout) getLayout()).setLayoutManager((LayoutManager2) layout);
if (!isValid()) {
invalidate();
}
}
}
}
项目:cn1
文件:JComponent.java
@Override
public Dimension getMaximumSize() {
if (isMaximumSizeSet()) {
return super.getMaximumSize();
}
if (ui != null) {
Dimension size = ui.getMaximumSize(this);
if (size != null) {
return new Dimension(size);
}
}
LayoutManager layout = getLayout();
if (layout != null && layout instanceof LayoutManager2) {
return ((LayoutManager2) layout).maximumLayoutSize(this);
}
return new Dimension(Short.MAX_VALUE,Short.MAX_VALUE);
}
项目:freeVM
文件:JComponent.java
@Override
public Dimension getMaximumSize() {
if (isMaximumSizeSet()) {
return super.getMaximumSize();
}
if (ui != null) {
Dimension size = ui.getMaximumSize(this);
if (size != null) {
return new Dimension(size);
}
}
LayoutManager layout = getLayout();
if (layout != null && layout instanceof LayoutManager2) {
return ((LayoutManager2) layout).maximumLayoutSize(this);
}
return new Dimension(Short.MAX_VALUE,Short.MAX_VALUE);
}
项目:taxonaut
文件:Panel.java
public Panel(LayoutManager2 layout,Locale locale,int subtype)
{
super(layout);
if(layout instanceof BorderLayout) {
((BorderLayout)getLayout()).setHgap(6);
}
createComponents(locale,subtype);
layoutComponents();
setComponentsSize();
}
项目:javify
文件:BasicInternalFrameUI.java
/**
* This method returns the maximum size of the given JComponent.
*
* @param x The JComponent to find a maximum size for.
*
* @return The maximum size.
*/
public Dimension getMaximumSize(JComponent x)
{
Dimension max = null;
LayoutManager layout = frame.getLayout();
if (frame == x && layout != null && layout instanceof LayoutManager2)
max = ((LayoutManager2) layout).maximumLayoutSize(frame);
else
max = new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
return max;
}
项目:jvm-stm
文件:BasicInternalFrameUI.java
/**
* This method returns the maximum size of the given JComponent.
*
* @param x The JComponent to find a maximum size for.
*
* @return The maximum size.
*/
public Dimension getMaximumSize(JComponent x)
{
Dimension max = null;
LayoutManager layout = frame.getLayout();
if (frame == x && layout != null && layout instanceof LayoutManager2)
max = ((LayoutManager2) layout).maximumLayoutSize(frame);
else
max = new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
return max;
}
项目:RipplePower
文件:Panels.java
@Override
protected void setUp() throws Exception {
super.setUp();
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
JFrame.setDefaultLookAndFeelDecorated(true);
frame = new JFrame();
rootPane = frame.getRootPane();
((JComponent) rootPane).setBorder(BorderFactory.createEmptyBorder(5,10,15,20));
ui = new MetalRootPaneUI();
rootPane.setUI(ui);
layout = (LayoutManager2) rootPane.getLayout();
titlePane = (JComponent) rootPane.getlayeredPane().getComponent(1);
}
项目:JamVM-PH
文件:BasicInternalFrameUI.java
/**
* This method returns the maximum size of the given JComponent.
*
* @param x The JComponent to find a maximum size for.
*
* @return The maximum size.
*/
public Dimension getMaximumSize(JComponent x)
{
Dimension max = null;
LayoutManager layout = frame.getLayout();
if (frame == x && layout != null && layout instanceof LayoutManager2)
max = ((LayoutManager2) layout).maximumLayoutSize(frame);
else
max = new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
return max;
}
项目:magarena
文件:FilterDialog.java
/**
* Default layout. Variable sized main panel containing filter
* values above fixed sized action bar.
*/
protected LayoutManager2 getLayoutManager() {
return new MigLayout("flowy,gap 0,insets 0","[fill,grow]",// column layout
"[fill,grow]3[fill]" // row layout
);
}
/**
* This method returns the maximum size of the given JComponent.
*
* @param x The JComponent to find a maximum size for.
*
* @return The maximum size.
*/
public Dimension getMaximumSize(JComponent x)
{
Dimension max = null;
LayoutManager layout = frame.getLayout();
if (frame == x && layout != null && layout instanceof LayoutManager2)
max = ((LayoutManager2) layout).maximumLayoutSize(frame);
else
max = new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
return max;
}
@Override
protected void setUp() throws Exception {
super.setUp();
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
JFrame.setDefaultLookAndFeelDecorated(true);
frame = new JFrame();
rootPane = frame.getRootPane();
((JComponent) rootPane).setBorder(BorderFactory.createEmptyBorder(5,20));
ui = new MetalRootPaneUI();
rootPane.setUI(ui);
layout = (LayoutManager2) rootPane.getLayout();
titlePane = (JComponent) rootPane.getlayeredPane().getComponent(1);
}
项目:conciliacao
文件:Window.java
/**
* Default constructor
*/
public Window(LayoutManager2 layout) {
this.setLayout(layout);
}
项目:xdm
文件:TitlePanel.java
public TitlePanel(LayoutManager2 lm,Window w) {
super(lm);
this.parentwindow = w;
this.registerMouseListener();
}
项目:xdm
文件:AboutDialog.java
void init() {
this.setUndecorated(true);
this.setSize(350,280);
this.getContentPane().setLayout((LayoutManager)null);
this.bgColor = new Color(73,73,73);
this.getContentPane().setBackground(this.bgColor);
TitlePanel titlePanel = new TitlePanel((LayoutManager2)null,this);
titlePanel.setopaque(false);
titlePanel.setBounds(0,350,50);
JLabel titleLbl = new JLabel("XDM 2016",0);
titleLbl.setFont(new Font("Dialog",1,20));
titleLbl.setForeground(StaticResource.selectedColor);
titleLbl.setBounds(0,320,74);
titlePanel.add(titleLbl);
this.add(titlePanel);
JLabel lineLbl = new JLabel();
lineLbl.setBackground(StaticResource.selectedColor);
lineLbl.setBounds(0,75,1);
lineLbl.setopaque(true);
this.add(lineLbl);
JLabel iconLbl = new JLabel(XDMMainWindow.getIcon("icon.png"));
iconLbl.setBounds(32,95,70,70);
this.add(iconLbl);
JTextArea txtInfo = new JTextArea("6.0.00\nBuilt on Sunday 6 march 2016\ncopyright (C) 2015\nSubhra Das Gupta\ncopyright (C) 2016\nSeedo Eldho Paul");
txtInfo.setBounds(114,100,201,90);
txtInfo.setEditable(false);
txtInfo.setBackground(this.bgColor);
txtInfo.setForeground(Color.WHITE);
this.add(txtInfo);
ImageIcon icon = XDMIconMap.getIcon("APP_ICON");
this.setTitle(StringResource.getString("ABT_TTL"));
this.setIconImage(icon.getimage());
JPanel p = new JPanel((LayoutManager)null);
p.setBackground(Color.GRAY);
p.setBounds(0,210,70);
this.add(p);
JButton okBtn = new JButton("OK");
okBtn.setForeground(Color.WHITE);
okBtn.setFont(StaticResource.plainFontBig2);
okBtn.setBackground(this.bgColor);
okBtn.setBounds(0,70);
p.add(okBtn);
okBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AboutDialog.this.setVisible(false);
}
});
}
项目:aibench-project
文件:JXRootPane.java
public void setLayoutManager(LayoutManager2 delegate) {
this.delegate = delegate;
}
项目:RipplePower
文件:RoundedPanel.java
项目:RipplePower
文件:Panels.java
public static JPanel newRoundedPanel(LayoutManager2 layout) {
JPanel panel = new RoundedPanel(layout);
return panel;
}
项目:swingx
文件:JXRootPane.java
/**
* The layout manager backing this manager. The delegate is used to
* calculate the size when the UI handles the window decorations.
*
* @param delegate
* the backing manager
*/
public void setLayoutManager(LayoutManager2 delegate) {
this.delegate = delegate;
}
项目:stendhal
文件:AnimatedLayout.java
/**
* Create a new AnimatedLayout.
*
* @param proxy layout manager to be used for determining the desired layout
*/
public AnimatedLayout(LayoutManager2 proxy) {
this.proxy = proxy;
animations = new WeakHashMap<Container,Animator>(5);
}
项目:toolkit
文件:Wrapper.java
项目:cohorte-utilities
文件:CPanelUpdater.java
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。