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.cfacc.v2_0.CFAccSwing.CFAccSwingAddressTagAttrJPanel.java
public void doLayout() { JLabel label;//www .j ava 2s .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 = getSwingLabelContainerContactAddress(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContactAddress(); 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.CFAccSwingSecGroupMemberAttrJPanel.java
public void doLayout() { JLabel label;/*from w w w . j a v a 2 s. com*/ 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 = getSwingLabelOwnerCluster(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerCluster(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerGroup(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerGroup(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentUser(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentUser(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelSecGroupMemberId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecGroupMemberId(); 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.CFAccSwingTSecGroupMemberAttrJPanel.java
public void doLayout() { JLabel label;/* w w w . java 2s . 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 = getSwingLabelContainerGroup(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerGroup(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentUser(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentUser(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelTSecGroupMemberId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTSecGroupMemberId(); 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.CFAccSwingSecGroupIncludeAttrJPanel.java
public void doLayout() { JLabel label;/*from www . j ava 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 = getSwingLabelOwnerCluster(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerCluster(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerGroup(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerGroup(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentSubGroup(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentSubGroup(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelSecGroupIncludeId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecGroupIncludeId(); 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.CFAccSwingTSecGroupIncludeAttrJPanel.java
public void doLayout() { JLabel label;/* w w w . j a 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 = getSwingLabelContainerGroup(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerGroup(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentSubGroup(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentSubGroup(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelTSecGroupIncludeId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorTSecGroupIncludeId(); 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.cfasterisk.v2_4.CFAsteriskSwing.CFAsteriskSwingSecUserAttrJPanel.java
public CFAsteriskSwingSecUserAttrJPanel(ICFAsteriskSwingSchema argSchema, ICFSecuritySecUserObj argFocus) { super();/*from w ww.j a v a2 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; setSwingFocusAsSecUser(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 = getSwingLabelLookupDefDev(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupDefDev(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelSecUserId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecUserId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLoginId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorLoginId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelEMailAddress(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorEMailAddress(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelEMailConfirmationUuid(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorEMailConfirmationUuid(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelPasswordHash(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorPasswordHash(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelPasswordResetUuid(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorPasswordResetUuid(); 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_2.CFAstSwing.CFAstSwingSecUserAttrJPanel.java
public CFAstSwingSecUserAttrJPanel(ICFAstSwingSchema argSchema, ICFAstSecUserObj argFocus) { super();// ww w. j av a2s . 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; setSwingFocusAsSecUser(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 = getSwingLabelLookupDefDev(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupDefDev(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelSecUserId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecUserId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelLoginId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorLoginId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelEMailAddress(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorEMailAddress(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelEMailConfirmationUuid(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorEMailConfirmationUuid(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelPasswordHash(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorPasswordHash(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelPasswordResetUuid(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorPasswordResetUuid(); 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.CFAccSwingServiceAttrJPanel.java
public void doLayout() { JLabel label;// w ww .ja v a 2 s . 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 = getSwingLabelOwnerCluster(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceOwnerCluster(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelContainerHost(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerHost(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelParentServiceType(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceParentServiceType(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelServiceId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorServiceId(); 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 = getSwingLabelHostPort(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorHostPort(); 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.cfasterisk.v2_1.CFAstSwing.CFAstSwingSecUserAttrJPanel.java
public CFAstSwingSecUserAttrJPanel(ICFAstSwingSchema argSchema, ICFAstSecUserObj argFocus) { super();/* w ww. j a va2s.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; setSwingFocusAsSecUser(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 = getSwingLabelLookupDefDev(); add(label); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupDefDev(); add(reference); reference.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelSecUserId(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorSecUserId(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelEMailAddress(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorEMailAddress(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelHtmlPwHexHash(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorHtmlPwHexHash(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelHtmlResetPwHexHash(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorHtmlResetPwHexHash(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelAppPwHexHash(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAppPwHexHash(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelAppResetPwHexHash(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAppResetPwHexHash(); add(compo); compo.setBounds(fieldx, y, fieldwidth, height); y = y + vspacing; label = getSwingLabelMailtoEMailAddress(); add(label); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorMailtoEMailAddress(); 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.CFAccSwingAttachmentAttrJPanel.java
public void doLayout() { JLabel label;/*from w w w . j av a 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 = getSwingLabelContainerContact(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceContainerContact(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelLookupMimeType(); label.setBounds(labelx, y, labelwidth, height); reference = getSwingReferenceLookupMimeType(); reference.setBounds(fieldx, y, usefieldwidth, height); y = y + vspacing; label = getSwingLabelAttachmentId(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAttachmentId(); 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 = getSwingLabelAttachment(); label.setBounds(labelx, y, labelwidth, height); compo = getSwingEditorAttachment(); dim = compo.getMaximumSize(); if (dim.width < usefieldwidth) { compo.setBounds(fieldx, y, dim.width, textheight); } else { compo.setBounds(fieldx, y, fieldwidth, textheight); } y = y + textvspacing; }