
com.viaoa.jfc.text.view.DialogLayout2 Maven / Gradle / Ivy
/* Copyright 1999-2015 Vince Via [email protected]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.viaoa.jfc.text.view;
/**
DialogLayout2
*/
import java.awt.*;
import java.util.*;
import javax.swing.*;
public class DialogLayout2 implements LayoutManager {
protected static final int COMP_TWO_COL = 0;
protected static final int COMP_BIG = 1;
protected static final int COMP_BUTTON = 2;
protected int m_divider = -1;
protected int m_hGap = 10;
protected int m_vGap = 5;
protected Vector m_v = new Vector();
public DialogLayout2() {}
public DialogLayout2(int hGap, int vGap) {
m_hGap = hGap;
m_vGap = vGap;
}
public void addLayoutComponent(String name, Component comp) {}
public void removeLayoutComponent(Component comp) {}
public Dimension preferredLayoutSize(Container parent) {
m_v.removeAllElements();
int w = 0;
int h = 0;
int type = -1;
for (int k=0 ; k 0)
m_divider = divider;
}
public int getDivider()
{
return m_divider;
}
protected int getDivider(Vector v)
{
if (m_divider > 0)
return m_divider;
int divider = 0;
for (int k=0 ; k
© 2015 - 2025 Weber Informatics LLC | Privacy Policy