List of usage examples for javax.swing JComponent setBounds
public void setBounds(int x, int y, int width, int height)
From source file:net.sourceforge.msscodefactory.cfgcash.v2_0.CFGCashSwing.CFGCashSwingHostNodeAttrJPanel.java
public CFGCashSwingHostNodeAttrJPanel(ICFGCashSwingSchema argSchema, ICFGCashHostNodeObj argFocus) { super();/*from www . j a v a2 s. co m*/ JLabel label; JComponent compo; CFJReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; setSwingFocusAsHostNode(argFocus); final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 785; final int panelwidth = fieldx + fieldwidth + spacing; // temporary -- I think you have to have a panel bigger than the coordinates initially setSize(panelwidth, 100000); label = getSwingLabelContainerCluster(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerCluster(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelHostNodeId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorHostNodeId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelDescription(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorDescription(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelHostName(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorHostName(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; // Now we can set the proper size based on the fields and references populated setSize(panelwidth, y); Dimension pfsz = new Dimension(panelwidth, y); setPreferredSize(pfsz); Dimension min = new Dimension(400, y); setMinimumSize(min); populateFields(); adjustComponentEnableStates(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingSecSessionAttrJPanel.java
public CFAccSwingSecSessionAttrJPanel(ICFAccSwingSchema argSchema, ICFAccSecSessionObj argFocus) { super();// w w w. ja v a2 s. co m JLabel label; JComponent compo; CFJReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; setSwingFocusAsSecSession(argFocus); final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 785; final int panelwidth = fieldx + fieldwidth + spacing; // temporary -- I think you have to have a panel bigger than the coordinates initially setSize(panelwidth, 100000); label = getSwingLabelContainerSecUser(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerSecUser(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelSecSessionId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecSessionId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelStart(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorStart(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelFinish(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFinish(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; // Now we can set the proper size based on the fields and references populated setSize(panelwidth, y); Dimension pfsz = new Dimension(panelwidth, y); setPreferredSize(pfsz); Dimension min = new Dimension(400, y); setMinimumSize(min); populateFields(); adjustComponentEnableStates(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstSwing.CFAstSwingSecSessionAttrJPanel.java
public CFAstSwingSecSessionAttrJPanel(ICFAstSwingSchema argSchema, ICFAstSecSessionObj argFocus) { super();//w ww. j a v a 2 s . c o m JLabel label; JComponent compo; CFJReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; setSwingFocusAsSecSession(argFocus); final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 785; final int panelwidth = fieldx + fieldwidth + spacing; // temporary -- I think you have to have a panel bigger than the coordinates initially setSize(panelwidth, 100000); label = getSwingLabelContainerSecUser(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerSecUser(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelSecSessionId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecSessionId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelStart(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorStart(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelFinish(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFinish(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; // Now we can set the proper size based on the fields and references populated setSize(panelwidth, y); Dimension pfsz = new Dimension(panelwidth, y); setPreferredSize(pfsz); Dimension min = new Dimension(400, y); setMinimumSize(min); populateFields(); adjustComponentEnableStates(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingDomainAttrJPanel.java
public void doLayout() { JLabel label;/* w w w. ja va 2 s . c om*/ JComponent compo; CFJReferenceEditor reference; Dimension dim; final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 1024; Dimension jpsz = getSize(); int usefieldwidth = jpsz.width - 215; label = getSwingLabelOwnerTenant(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerParentDomain(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerParentDomain(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorId(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelDescription(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorDescription(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; label = getSwingLabelName(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorName(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingContactListAttrJPanel.java
public CFAccSwingContactListAttrJPanel(ICFAccSwingSchema argSchema, ICFAccContactListObj argFocus) { super();//from w w w . j a v a 2 s .c o m JLabel label; JComponent compo; CFJReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; setSwingFocusAsContactList(argFocus); final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 785; final int panelwidth = fieldx + fieldwidth + spacing; // temporary -- I think you have to have a panel bigger than the coordinates initially setSize(panelwidth, 100000); label = getSwingLabelContainerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelContactListId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorContactListId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelDescription(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorDescription(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelStripDigits(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorStripDigits(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; // Now we can set the proper size based on the fields and references populated setSize(panelwidth, y); Dimension pfsz = new Dimension(panelwidth, y); setPreferredSize(pfsz); Dimension min = new Dimension(400, y); setMinimumSize(min); populateFields(); adjustComponentEnableStates(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswSwing.CFFswSwingFSSofiaAttrJPanel.java
public CFFswSwingFSSofiaAttrJPanel(ICFFswSwingSchema argSchema, ICFFswFSSofiaObj argFocus) { super();/*from ww w. j av a 2s . co m*/ JLabel label; JComponent compo; CFJReferenceEditor reference; final String S_ProcName = "construct-schema-focus"; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. swingSchema = argSchema; setSwingFocusAsFSSofia(argFocus); final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 785; final int panelwidth = fieldx + fieldwidth + spacing; // temporary -- I think you have to have a panel bigger than the coordinates initially setSize(panelwidth, 100000); label = getSwingLabelContainerTenant(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerTenant(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelFSSofiaId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorFSSofiaId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelName(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorName(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLogLevel(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorLogLevel(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelAutoRestart(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAutoRestart(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelDebugPresence(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorDebugPresence(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; // Now we can set the proper size based on the fields and references populated setSize(panelwidth, y); Dimension pfsz = new Dimension(panelwidth, y); setPreferredSize(pfsz); Dimension min = new Dimension(400, y); setMinimumSize(min); populateFields(); adjustComponentEnableStates(); swingIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingContactTagAttrJPanel.java
public void doLayout() { JLabel label;//from w w w . j a va 2 s . c o m JComponent compo; CFJReferenceEditor reference; Dimension dim; final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 1024; Dimension jpsz = getSize(); int usefieldwidth = jpsz.width - 215; label = getSwingLabelOwnerTenant(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContact(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContact(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingMemoTagAttrJPanel.java
public void doLayout() { JLabel label;/*from ww w . ja v a 2 s . c o m*/ JComponent compo; CFJReferenceEditor reference; Dimension dim; final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 1024; Dimension jpsz = getSize(); int usefieldwidth = jpsz.width - 215; label = getSwingLabelOwnerTenant(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContactMemo(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactMemo(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingPhoneTagAttrJPanel.java
public void doLayout() { JLabel label;/*from w w w.ja v a2 s . c o m*/ JComponent compo; CFJReferenceEditor reference; Dimension dim; final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 1024; Dimension jpsz = getSize(); int usefieldwidth = jpsz.width - 215; label = getSwingLabelOwnerTenant(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContactPhone(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactPhone(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccSwing.CFAccSwingAttachmentTagAttrJPanel.java
public void doLayout() { JLabel label;// ww w .j a v a2s. co m JComponent compo; CFJReferenceEditor reference; Dimension dim; final int spacing = 5; int y = spacing; final int height = 25; final int textheight = 80; final int vspacing = height + spacing; final int textvspacing = textheight + spacing; final int labelx = spacing; final int labelwidth = 200; final int fieldx = labelx + labelwidth + spacing; final int fieldwidth = 1024; Dimension jpsz = getSize(); int usefieldwidth = jpsz.width - 215; label = getSwingLabelOwnerTenant(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerTenant(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerContactAttach(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactAttach(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentTag(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentTag(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelTagValue(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTagValue(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, height); } else { compo.setBounds(fieldx, y, fieldwidth, height); } y = y + vspacing; }