Examples of RelativeLayout


Examples of edu.cmu.relativelayout.RelativeLayout

    area = new JTextArea();
    users = new JTextArea();
    area.setEditable(false);
    area.setBackground(new Color(255, 255, 153));
    frame = new JFrame("Discussion Room");
    panel = new JPanel(new RelativeLayout());
    chatPane = new JScrollPane(area);
    userList = new JScrollPane(users);
    paintCanvas = new MyCanvas();
    inputField = new JTextField();
    sendButton = new JButton("Send");
View Full Code Here

Examples of edu.cmu.relativelayout.RelativeLayout

    // testSanityChecking();
  }

  public static void testCentering() {
    JFrame frame = new JFrame();
    frame.setLayout(new RelativeLayout());

    JPanel corner = new JPanel();
    corner.setPreferredSize(new Dimension(96, 96));
    Border b = BorderFactory.createBevelBorder(BevelBorder.RAISED);
    corner.setBorder(b);
View Full Code Here

Examples of edu.cmu.relativelayout.RelativeLayout

    frame.setVisible(true);
  }

  public static void testDialog() {
    JFrame frame = new JFrame();
    frame.setLayout(new RelativeLayout());

    JLabel label =
        new JLabel("RelativeLayout is much easier to use.  Are you sure you want to go on using other layouts?");
    JTextArea area = new JTextArea("Some text here.");
    area.setBorder(new BevelBorder(BevelBorder.LOWERED));
View Full Code Here

Examples of edu.cmu.relativelayout.RelativeLayout

  }

  public static void testSanityChecking() {
    JFrame frame = new JFrame();
    frame.setLayout(new RelativeLayout());

    JButton one = new JButton("One");
    JButton two = new JButton("Two");
    JButton three = new JButton("Three");
View Full Code Here

Examples of edu.cmu.relativelayout.RelativeLayout

    frame.setVisible(true);
  }

  public static void testStaticLayout() {
    JFrame frame = new JFrame();
    frame.setLayout(new RelativeLayout());

    JButton one = new JButton("One");
    JButton two = new JButton("Two");
    JButton three = new JButton("Three");
View Full Code Here

Examples of edu.cmu.relativelayout.RelativeLayout

   *
   */
  @SuppressWarnings("unused")
  private static void testCorners() {
    JFrame frame = new JFrame();
    frame.setLayout(new RelativeLayout());

    JButton one = new JButton("One");
    JButton two = new JButton("Two");
    JButton three = new JButton("Three");
    JButton four = new JButton("Four");
View Full Code Here

Examples of edu.cmu.relativelayout.RelativeLayout

  /**
   *
   */
  private static void testMailInterface() {
    JFrame frame = new JFrame();
    frame.setLayout(new RelativeLayout());

    JScrollPane folderView =
        new JScrollPane(new JTree(new Object[] { "Inbox", "Drafts", "Sent Mail", "Spam", "Trash" }));
    JScrollPane mailList =
        new JScrollPane(new JList(new Object[] { "Get rich quick!", "Dr. Mkele Mbogo from Nigeria",
View Full Code Here

Examples of edu.cmu.relativelayout.RelativeLayout

    TestUI.test();
  }

  public static void test() {
    JFrame frame = new JFrame();
    frame.setLayout(new RelativeLayout());

    JTextArea area = new JTextArea("Some text here.");
    JLabel okLabel = new JLabel("OK");
    JButton addButton = new JButton("Add");
    JButton editButton = new JButton("Edit");
View Full Code Here

Examples of mage.client.components.layout.RelativeLayout

        jSplitPane2.setResizeWeight(0.5);
        jSplitPane2.setLeftComponent(userChatPanel);
        jSplitPane2.setBottomComponent(gameChatPanel);

        phasesContainer = new JPanel();
        phasesContainer.setLayout(new RelativeLayout(RelativeLayout.Y_AXIS));
        phasesContainer.setBackground(new Color(0, 0, 0, 0));
        Float ratio = (float) 1;
        JPanel empty1 = new JPanel();
        empty1.setBackground(new Color(0, 0, 0, 0));
        phasesContainer.add(empty1, ratio);
View Full Code Here

Examples of org.terasology.rendering.nui.layouts.relative.RelativeLayout

        footerGrid.setColumns(2);
        footerGrid.addWidget(new UIButton("reset", "Restore Defaults"));
        footerGrid.addWidget(new UIButton("close", "Back"));
        footerGrid.setHorizontalSpacing(8);

        RelativeLayout layout = new RelativeLayout();
        layout.addWidget(new UIImage("title", Assets.getTexture("engine:terasology")),
                HorizontalHint.create().fixedWidth(512).center(),
                VerticalHint.create().fixedHeight(128).alignTop(48));
        layout.addWidget(new UILabel("subtitle", "title", "Input Settings"),
                HorizontalHint.create().center(),
                VerticalHint.create().fixedHeight(48).alignTopRelativeTo("title", VerticalAlign.BOTTOM));
        layout.addWidget(area,
                HorizontalHint.create().fixedWidth(640).center(),
                VerticalHint.create().alignTopRelativeTo("subtitle", VerticalAlign.BOTTOM).alignBottomRelativeTo("footer", VerticalAlign.TOP, 48));
        layout.addWidget(footerGrid,
                HorizontalHint.create().center().fixedWidth(400),
                VerticalHint.create().fixedHeight(48).alignBottom(48));

        setContents(layout);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.