Java Code Examples for java.awt.BorderLayout#getLayoutComponent()
The following examples show how to use
java.awt.BorderLayout#getLayoutComponent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MetaData.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 2
Source File: MetaData.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 3
Source File: MetaData.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 4
Source File: MetaData.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 5
Source File: TruffleSummaryView.java From visualvm with GNU General Public License v2.0 | 6 votes |
void setRealModel(TableModel model) { if (table == null) { BorderLayout bl = (BorderLayout)getLayout(); Component c = bl.getLayoutComponent(BorderLayout.CENTER); if (c != null) remove(c); table = createTable(model); add(table, BorderLayout.CENTER); Container parent = getParent(); if (parent != null) { parent.invalidate(); parent.revalidate(); parent.repaint(); } } else { table.setModel(model); } setupTable(table); enableTableEvents(table); link.setEnabled(true); }
Example 6
Source File: JavaObjectsSummary.java From visualvm with GNU General Public License v2.0 | 6 votes |
void setRealModel(TableModel model) { if (table == null) { BorderLayout bl = (BorderLayout)getLayout(); Component c = bl.getLayoutComponent(BorderLayout.CENTER); if (c != null) remove(c); table = createTable(model); add(table, BorderLayout.CENTER); getParent().invalidate(); getParent().revalidate(); getParent().repaint(); } table.setModel(model); setupTable(table); enableTableEvents(table); link.setEnabled(true); }
Example 7
Source File: MetaData.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 8
Source File: MetaData.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 9
Source File: MetaData.java From Java8CN with Apache License 2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 10
Source File: MetaData.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 11
Source File: MetaData.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 12
Source File: MetaData.java From Bytecoder with Apache License 2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 13
Source File: MetaData.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 14
Source File: MetaData.java From jdk-1.7-annotated with Apache License 2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 15
Source File: MetaData.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 16
Source File: MetaData.java From JDKSourceCode1.8 with MIT License | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 17
Source File: MetaData.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 18
Source File: MetaData.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 19
Source File: MetaData.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); BorderLayout oldLayout = (BorderLayout) oldInstance; BorderLayout newLayout = (BorderLayout) newInstance; for (String constraints : CONSTRAINTS) { Object oldC = oldLayout.getLayoutComponent(constraints); Object newC = newLayout.getLayoutComponent(constraints); // Pending, assume any existing elements are OK. if (oldC != null && newC == null) { invokeStatement(oldInstance, "addLayoutComponent", new Object[] { oldC, constraints }, out); } } }
Example 20
Source File: TracerView.java From visualvm with GNU General Public License v2.0 | 5 votes |
private void addContents(JComponent container, JComponent contents) { BorderLayout layout = (BorderLayout)container.getLayout(); Component oldContents = layout.getLayoutComponent(BorderLayout.CENTER); if (oldContents != contents) { if (oldContents != null) container.remove(oldContents); container.add(contents, BorderLayout.CENTER); contents.requestFocusInWindow(); container.revalidate(); container.repaint(); } }