Example usage for javax.swing SwingConstants BOTTOM

List of usage examples for javax.swing SwingConstants BOTTOM

Introduction

In this page you can find the example usage for javax.swing SwingConstants BOTTOM.

Prototype

int BOTTOM

To view the source code for javax.swing SwingConstants BOTTOM.

Click Source Link

Document

Box-orientation constant used to specify the bottom of a box.

Usage

From source file:org.piraso.ui.base.RequestTreeTopComponent.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*from   w ww. ja va2 s  . c o m*/
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jScrollPane1 = new javax.swing.JScrollPane();
    jTree = new javax.swing.JTree();
    toolbar = new javax.swing.JToolBar();
    btnCollapse = new javax.swing.JButton();
    btnColorLatest = new javax.swing.JToggleButton();
    jSeparator1 = new javax.swing.JToolBar.Separator();
    btnTarget = new javax.swing.JButton();

    setLayout(new java.awt.BorderLayout());

    jTree.setModel(model);
    jTree.setCellRenderer(new TreeCellRenderer());
    jTree.setRootVisible(false);
    jTree.setShowsRootHandles(true);
    jScrollPane1.setViewportView(jTree);

    add(jScrollPane1, java.awt.BorderLayout.CENTER);

    toolbar.setBackground(new java.awt.Color(226, 226, 226));
    toolbar.setFloatable(false);
    toolbar.setRollover(true);
    toolbar.setOpaque(false);

    btnCollapse.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/piraso/ui/base/icons/gh-icon-collapse.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(btnCollapse, org.openide.util.NbBundle
            .getMessage(RequestTreeTopComponent.class, "RequestTreeTopComponent.btnCollapse.text")); // NOI18N
    btnCollapse.setToolTipText(org.openide.util.NbBundle.getMessage(RequestTreeTopComponent.class,
            "RequestTreeTopComponent.btnCollapse.toolTipText")); // NOI18N
    btnCollapse.setBorder(javax.swing.BorderFactory.createEmptyBorder(7, 7, 7, 7));
    btnCollapse.setFocusable(false);
    btnCollapse.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnCollapse.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnCollapse.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCollapseActionPerformed(evt);
        }
    });
    toolbar.add(btnCollapse);

    btnColorLatest
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/base/icons/time.png"))); // NOI18N
    btnColorLatest.setSelected(true);
    org.openide.awt.Mnemonics.setLocalizedText(btnColorLatest, org.openide.util.NbBundle
            .getMessage(RequestTreeTopComponent.class, "RequestTreeTopComponent.btnColorLatest.text")); // NOI18N
    btnColorLatest.setToolTipText(org.openide.util.NbBundle.getMessage(RequestTreeTopComponent.class,
            "RequestTreeTopComponent.btnColorLatest.toolTipText")); // NOI18N
    btnColorLatest.setFocusable(false);
    btnColorLatest.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnColorLatest.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnColorLatest.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnColorLatestActionPerformed(evt);
        }
    });
    toolbar.add(btnColorLatest);
    toolbar.add(jSeparator1);

    btnTarget.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/base/icons/target_arrow.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(btnTarget, org.openide.util.NbBundle
            .getMessage(RequestTreeTopComponent.class, "RequestTreeTopComponent.btnTarget.text")); // NOI18N
    btnTarget.setToolTipText(org.openide.util.NbBundle.getMessage(RequestTreeTopComponent.class,
            "RequestTreeTopComponent.btnTarget.toolTipText")); // NOI18N
    btnTarget.setBorder(javax.swing.BorderFactory.createEmptyBorder(7, 7, 7, 7));
    btnTarget.setFocusable(false);
    btnTarget.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnTarget.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnTarget.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnTargetActionPerformed(evt);
        }
    });
    toolbar.add(Box.createHorizontalGlue());
    toolbar.add(btnTarget);

    add(toolbar, java.awt.BorderLayout.NORTH);
}

From source file:org.piraso.ui.sql.SQLViewTopComponent.java

/** This method is called from within the constructor to
 * initialize the form./*from   w  w w. j a v  a 2 s.  c o  m*/
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    scrollSQLPane = new javax.swing.JScrollPane();
    txtSQL = new javax.swing.JEditorPane();
    scrollTable = new javax.swing.JScrollPane();
    table = new javax.swing.JTable();
    jToolBar1 = new javax.swing.JToolBar();
    btnProperties = new javax.swing.JToggleButton();
    btnReplaceParameters = new javax.swing.JToggleButton();
    btnFormat = new javax.swing.JToggleButton();
    btnCopy = new javax.swing.JButton();
    jSplitPane1 = new javax.swing.JSplitPane();

    txtSQL.setFont(FontProviderManager.INSTANCE.getEditorDefaultFont());
    scrollSQLPane.setViewportView(txtSQL);

    table.setFont(FontProviderManager.INSTANCE.getEditorDefaultFont());
    table.setModel(tableModel);
    scrollTable.setViewportView(table);

    setLayout(new java.awt.BorderLayout());

    jToolBar1.setBackground(new java.awt.Color(226, 226, 226));
    jToolBar1.setFloatable(false);
    jToolBar1.setOrientation(1);
    jToolBar1.setRollover(true);

    btnProperties.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/sql/icons/properties.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(btnProperties, org.openide.util.NbBundle
            .getMessage(SQLViewTopComponent.class, "SQLViewTopComponent.btnProperties.text")); // NOI18N
    btnProperties.setToolTipText(org.openide.util.NbBundle.getMessage(SQLViewTopComponent.class,
            "SQLViewTopComponent.btnProperties.toolTipText")); // NOI18N
    btnProperties.setFocusable(false);
    btnProperties.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnProperties.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnProperties.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnPropertiesActionPerformed(evt);
        }
    });
    jToolBar1.add(btnProperties);

    btnReplaceParameters.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/piraso/ui/sql/icons/replace_variables.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(btnReplaceParameters, org.openide.util.NbBundle
            .getMessage(SQLViewTopComponent.class, "SQLViewTopComponent.btnReplaceParameters.text")); // NOI18N
    btnReplaceParameters.setToolTipText(org.openide.util.NbBundle.getMessage(SQLViewTopComponent.class,
            "SQLViewTopComponent.btnReplaceParameters.toolTipText")); // NOI18N
    btnReplaceParameters.setFocusable(false);
    btnReplaceParameters.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnReplaceParameters.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnReplaceParameters.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnReplaceParametersActionPerformed(evt);
        }
    });
    jToolBar1.add(btnReplaceParameters);

    btnFormat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/sql/icons/format.png"))); // NOI18N
    btnFormat.setSelected(true);
    org.openide.awt.Mnemonics.setLocalizedText(btnFormat, org.openide.util.NbBundle
            .getMessage(SQLViewTopComponent.class, "SQLViewTopComponent.btnFormat.text")); // NOI18N
    btnFormat.setToolTipText(org.openide.util.NbBundle.getMessage(SQLViewTopComponent.class,
            "SQLViewTopComponent.btnFormat.toolTipText")); // NOI18N
    btnFormat.setFocusable(false);
    btnFormat.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnFormat.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnFormat.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnFormatActionPerformed(evt);
        }
    });
    jToolBar1.add(btnFormat);

    btnCopy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/sql/icons/copy.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(btnCopy, org.openide.util.NbBundle
            .getMessage(SQLViewTopComponent.class, "SQLViewTopComponent.btnCopy.text")); // NOI18N
    btnCopy.setToolTipText(org.openide.util.NbBundle.getMessage(SQLViewTopComponent.class,
            "SQLViewTopComponent.btnCopy.toolTipText")); // NOI18N
    btnCopy.setBorder(javax.swing.BorderFactory.createEmptyBorder(7, 7, 7, 7));
    btnCopy.setEnabled(false);
    btnCopy.setFocusable(false);
    btnCopy.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnCopy.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnCopy.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCopyActionPerformed(evt);
        }
    });
    jToolBar1.add(btnCopy);

    add(jToolBar1, java.awt.BorderLayout.LINE_START);
    add(jSplitPane1, java.awt.BorderLayout.CENTER);
}

From source file:pcgen.core.SettingsHandler.java

public static Dimension getOptionsFromProperties(final PlayerCharacter aPC) {
    Dimension d = new Dimension(0, 0);

    final String tempBrowserPath = getPCGenOption("browserPath", ""); //$NON-NLS-1$ //$NON-NLS-2$

    if (!"".equals(tempBrowserPath)) //$NON-NLS-1$
    {/*ww w. j av a2s  .c o m*/
        setBrowserPath(tempBrowserPath);
    } else {
        setBrowserPath(null);
    }

    setLeftUpperCorner(new Point(getPCGenOption("windowLeftUpperCorner.X", -1.0).intValue(), //$NON-NLS-1$
            getPCGenOption("windowLeftUpperCorner.Y", -1.0).intValue())); //$NON-NLS-1$

    setWindowState(getPCGenOption("windowState", Frame.NORMAL)); //$NON-NLS-1$

    Double dw = getPCGenOption("windowWidth", 0.0); //$NON-NLS-1$
    Double dh = getPCGenOption("windowHeight", 0.0); //$NON-NLS-1$

    if (!CoreUtility.doublesEqual(dw.doubleValue(), 0.0) && !CoreUtility.doublesEqual(dh.doubleValue(), 0.0)) {
        final int width = Integer.parseInt(
                dw.toString().substring(0, Math.min(dw.toString().length(), dw.toString().lastIndexOf('.'))));
        final int height = Integer.parseInt(
                dh.toString().substring(0, Math.min(dh.toString().length(), dh.toString().lastIndexOf('.'))));
        d = new Dimension(width, height);
    }

    setCustomizerLeftUpperCorner(
            new Point(getPCGenOption("customizer.windowLeftUpperCorner.X", -1.0).intValue(), //$NON-NLS-1$
                    getPCGenOption("customizer.windowLeftUpperCorner.Y", -1.0).intValue())); //$NON-NLS-1$
    dw = getPCGenOption("customizer.windowWidth", 0.0); //$NON-NLS-1$
    dh = getPCGenOption("customizer.windowHeight", 0.0); //$NON-NLS-1$

    if (!CoreUtility.doublesEqual(dw.doubleValue(), 0.0) && !CoreUtility.doublesEqual(dh.doubleValue(), 0.0)) {
        setCustomizerDimension(new Dimension(dw.intValue(), dh.intValue()));
    }

    setKitSelectorLeftUpperCorner(
            new Point(getPCGenOption("kitSelector.windowLeftUpperCorner.X", -1.0).intValue(), //$NON-NLS-1$
                    getPCGenOption("kitSelector.windowLeftUpperCorner.Y", -1.0).intValue())); //$NON-NLS-1$
    dw = getPCGenOption("kitSelector.windowWidth", 0.0); //$NON-NLS-1$
    dh = getPCGenOption("kitSelector.windowHeight", 0.0); //$NON-NLS-1$

    if (!CoreUtility.doublesEqual(dw.doubleValue(), 0.0) && !CoreUtility.doublesEqual(dh.doubleValue(), 0.0)) {
        setKitSelectorDimension(new Dimension(dw.intValue(), dh.intValue()));
    }

    //
    // Read in the buy/sell percentages for the gear tab
    // If not in the .ini file and ignoreCost is set, then use 0%
    // Otherwise set buy to 100% and sell to %50
    //
    int buyRate = getPCGenOption("GearTab.buyRate", -1); //$NON-NLS-1$
    int sellRate = getPCGenOption("GearTab.sellRate", -1); //$NON-NLS-1$

    if ((buyRate < 0) || (sellRate < 0)) {
        if (getPCGenOption("GearTab.ignoreCost", false)) //$NON-NLS-1$
        {
            buyRate = 0;
            sellRate = 0;
        } else {
            buyRate = 100;
            sellRate = 50;
        }
    }

    Globals.initCustColumnWidth(CoreUtility.split(getOptions().getProperty("pcgen.options.custColumnWidth", ""), //$NON-NLS-1$//$NON-NLS-2$
            ','));

    loadURLs = getPCGenOption("loadURLs", false); //$NON-NLS-1$

    Globals.setSourceDisplay(
            SourceFormat.values()[getPCGenOption("sourceDisplay", SourceFormat.LONG.ordinal())]); //$NON-NLS-1$

    setAlwaysOverwrite(getPCGenOption("alwaysOverwrite", false)); //$NON-NLS-1$
    setAutoFeatsRefundable(getPCGenOption("autoFeatsRefundable", false)); //$NON-NLS-1$
    setAutogenExoticMaterial(getPCGenOption("autoGenerateExoticMaterial", false)); //$NON-NLS-1$
    setAutogenMagic(getPCGenOption("autoGenerateMagic", false)); //$NON-NLS-1$
    setAutogenMasterwork(getPCGenOption("autoGenerateMasterwork", false)); //$NON-NLS-1$
    setAutogenRacial(getPCGenOption("autoGenerateRacial", false)); //$NON-NLS-1$
    setChaTabPlacement(getOptionTabPlacement("chaTabPlacement", SwingConstants.TOP)); //$NON-NLS-1$
    setCreatePcgBackup(getPCGenOption("createPcgBackup", true));
    setCustomizerSplit1(getPCGenOption("customizer.split1", -1)); //$NON-NLS-1$
    setCustomizerSplit2(getPCGenOption("customizer.split2", -1)); //$NON-NLS-1$
    setDefaultOSType(getPCGenOption("defaultOSType", null)); //$NON-NLS-1$
    setEnforceSpendingBeforeLevelUp(getPCGenOption("enforceSpendingBeforeLevelUp", false)); //$NON-NLS-1$
    setGearTab_AllowDebt(getPCGenOption("GearTab.allowDebt", false)); //$NON-NLS-1$
    setGearTab_AutoResize(getPCGenOption("GearTab.autoResize", false)); //$NON-NLS-1$
    setGearTab_BuyRate(buyRate);
    setGearTab_IgnoreCost(getPCGenOption("GearTab.ignoreCost", false)); //$NON-NLS-1$
    setGearTab_SellRate(sellRate);
    setGrimHPMode(getPCGenOption("grimHPMode", false)); //$NON-NLS-1$
    setGrittyACMode(getPCGenOption("grittyACMode", false)); //$NON-NLS-1$
    setGUIUsesOutputNameEquipment(getPCGenOption("GUIUsesOutputNameEquipment", false)); //$NON-NLS-1$
    setGUIUsesOutputNameSpells(getPCGenOption("GUIUsesOutputNameSpells", false)); //$NON-NLS-1$
    setHideMonsterClasses(getPCGenOption("hideMonsterClasses", false)); //$NON-NLS-1$
    setHPMaxAtFirstLevel(getPCGenOption("hpMaxAtFirstLevel", true)); //$NON-NLS-1$
    setHPMaxAtFirstClassLevel(getPCGenOption("hpMaxAtFirstClassLevel", false)); //$NON-NLS-1$
    setHPMaxAtFirstPCClassLevelOnly(getPCGenOption("hpMaxAtFirstPCClassLevelOnly", false)); //$NON-NLS-1$
    setHPPercent(getPCGenOption("hpPercent", 100)); //$NON-NLS-1$
    setHPRollMethod(getPCGenOption("hpRollMethod", Constants.HP_STANDARD)); //$NON-NLS-1$
    setIgnoreMonsterHDCap(getPCGenOption("ignoreMonsterHDCap", false)); //$NON-NLS-1$
    setInvalidDmgText(getPCGenOption("invalidDmgText", //$NON-NLS-1$
            LanguageBundle.getString("SettingsHandler.114"))); //$NON-NLS-1$
    setInvalidToHitText(getPCGenOption("invalidToHitText", //$NON-NLS-1$
            LanguageBundle.getString("SettingsHandler.114"))); //$NON-NLS-1$
    setLastTipShown(getPCGenOption("lastTipOfTheDayTipShown", -1)); //$NON-NLS-1$
    setLookAndFeel(getPCGenOption("looknFeel", 1)); //$NON-NLS-1$
    setMaxPotionSpellLevel(getPCGenOption("maxPotionSpellLevel", 3)); //$NON-NLS-1$
    setMaxWandSpellLevel(getPCGenOption("maxWandSpellLevel", 4)); //$NON-NLS-1$
    setMetamagicAllowedInEqBuilder(getPCGenOption("allowMetamagicInCustomizer", false)); //$NON-NLS-1$
    setPccFilesLocation(new File(expandRelativePath(getPCGenOption("pccFilesLocation", //$NON-NLS-1$
            System.getProperty("user.dir") + File.separator + "data")))); //$NON-NLS-1$ //$NON-NLS-2$
    setPcgenOutputSheetDir(
            new File(expandRelativePath(getOptions().getProperty("pcgen.files.pcgenOutputSheetDir", //$NON-NLS-1$
                    System.getProperty("user.dir") + File.separator + "outputsheets")))); //$NON-NLS-1$ //$NON-NLS-2$
    setPcgenPreviewDir(new File(expandRelativePath(getOptions().getProperty("pcgen.files.pcgenPreviewDir", //$NON-NLS-1$
            System.getProperty("user.dir") + File.separator + "preview")))); //$NON-NLS-1$ //$NON-NLS-2$
    setGmgenPluginDir(new File(expandRelativePath(getOptions().getProperty("gmgen.files.gmgenPluginDir", //$NON-NLS-1$
            System.getProperty("user.dir") + File.separator + "plugins")))); //$NON-NLS-1$ //$NON-NLS-2$
    setBackupPcgPath(
            new File(expandRelativePath(getOptions().getProperty("pcgen.files.characters.backup", "")))); //$NON-NLS-1$
    setPortraitsPath(new File(expandRelativePath(getOptions().getProperty("pcgen.files.portraits", //$NON-NLS-1$
            Globals.getDefaultPcgPath()))));
    setPostExportCommandStandard(getPCGenOption("postExportCommandStandard", "")); //$NON-NLS-1$ //$NON-NLS-2$
    setPostExportCommandPDF(getPCGenOption("postExportCommandPDF", "")); //$NON-NLS-1$ //$NON-NLS-2$
    setPrereqFailColor(getPCGenOption("prereqFailColor", Color.red.getRGB())); //$NON-NLS-1$
    setPrereqQualifyColor(getPCGenOption("prereqQualifyColor", SystemColor.text.getRGB())); //$NON-NLS-1$
    setPreviewTabShown(getPCGenOption("previewTabShown", true)); //$NON-NLS-1$
    setROG(getPCGenOption("isROG", false)); //$NON-NLS-1$
    setSaveCustomInLst(getPCGenOption("saveCustomInLst", false)); //$NON-NLS-1$
    setSaveOutputSheetWithPC(getPCGenOption("saveOutputSheetWithPC", false)); //$NON-NLS-1$
    setPrintSpellsWithPC(getPCGenOption("printSpellsWithPC", true)); //$NON-NLS-1$
    setSelectedSpellSheet(
            expandRelativePath(getOptions().getProperty("pcgen.files.selectedSpellOutputSheet", ""))); //$NON-NLS-1$ //$NON-NLS-2$
    setSelectedCharacterHTMLOutputSheet(
            expandRelativePath(getOptions().getProperty("pcgen.files.selectedCharacterHTMLOutputSheet", //$NON-NLS-1$
                    "")), //$NON-NLS-1$
            aPC);
    setSelectedCharacterPDFOutputSheet(
            expandRelativePath(getOptions().getProperty("pcgen.files.selectedCharacterPDFOutputSheet", //$NON-NLS-1$
                    "")), //$NON-NLS-1$
            aPC);
    setSelectedEqSetTemplate(
            expandRelativePath(getOptions().getProperty("pcgen.files.selectedEqSetTemplate", ""))); //$NON-NLS-1$ //$NON-NLS-2$
    setSelectedPartyHTMLOutputSheet(
            expandRelativePath(getOptions().getProperty("pcgen.files.selectedPartyHTMLOutputSheet", //$NON-NLS-1$
                    ""))); //$NON-NLS-1$
    setSelectedPartyPDFOutputSheet(
            expandRelativePath(getOptions().getProperty("pcgen.files.selectedPartyPDFOutputSheet", //$NON-NLS-1$
                    ""))); //$NON-NLS-1$
    setShowFeatDialogAtLevelUp(getPCGenOption("showFeatDialogAtLevelUp", true)); //$NON-NLS-1$
    setShowHPDialogAtLevelUp(getPCGenOption("showHPDialogAtLevelUp", true)); //$NON-NLS-1$
    setShowImagePreview(getPCGenOption("showImagePreview", true)); //$NON-NLS-1$
    setShowSingleBoxPerBundle(getPCGenOption("showSingleBoxPerBundle", false)); //$NON-NLS-1$
    setOutputDeprecationMessages(getPCGenOption("outputDeprecationMessages", true));
    setInputUnconstructedMessages(getPCGenOption("inputUnconstructedMessages", false));
    setShowStatDialogAtLevelUp(getPCGenOption("showStatDialogAtLevelUp", true)); //$NON-NLS-1$
    setShowTipOfTheDay(getPCGenOption("showTipOfTheDay", true)); //$NON-NLS-1$
    setShowToolBar(getPCGenOption("showToolBar", true)); //$NON-NLS-1$
    setShowSkillModifier(getPCGenOption("showSkillModifier", true)); //$NON-NLS-1$
    setShowSkillRanks(getPCGenOption("showSkillRanks", true)); //$NON-NLS-1$
    setShowWarningAtFirstLevelUp(getPCGenOption("showWarningAtFirstLevelUp", true)); //$NON-NLS-1$
    setSkinLFThemePack(getPCGenOption("skinLFThemePack", "")); //$NON-NLS-1$ //$NON-NLS-2$
    setSpellMarketPriceAdjusted(getPCGenOption("spellMarketPriceAdjusted", false)); //$NON-NLS-1$
    setTabPlacement(getOptionTabPlacement("tabPlacement", SwingConstants.BOTTOM)); //$NON-NLS-1$
    setUseHigherLevelSlotsDefault(getPCGenOption("useHigherLevelSlotsDefault", false)); //$NON-NLS-1$
    setUseWaitCursor(getPCGenOption("useWaitCursor", true)); //$NON-NLS-1$
    setWantToLoadMasterworkAndMagic(getPCGenOption("loadMasterworkAndMagicFromLst", false)); //$NON-NLS-1$
    setWeaponProfPrintout(getPCGenOption("weaponProfPrintout", Constants.DEFAULT_PRINTOUT_WEAPONPROF));

    // Load up all the RuleCheck stuff from the options.ini file
    // It's stored as:
    //   pcgen.options.rulechecks=aKey:Y|bKey:N|cKey:Y
    parseRuleChecksFromOptions(getPCGenOption("ruleChecks", "")); //$NON-NLS-1$ //$NON-NLS-2$

    return d;
}

From source file:pcgen.core.SettingsHandler.java

private static int getOptionTabPlacement(final String optionName, final int defaultValue) {
    final String aString = getPCGenOption(optionName, convertTabPlacementToString(defaultValue));
    int iVal;/*  w  ww. ja  va 2s  .  c o  m*/

    try {
        iVal = Integer.parseInt(aString);

        switch (iVal) {
        case SwingConstants.TOP:
        case SwingConstants.LEFT:
        case SwingConstants.BOTTOM:
        case SwingConstants.RIGHT:
            break;

        default:
            iVal = defaultValue;

            break;
        }
    } catch (NumberFormatException exc) {
        if ("TOP".equals(aString)) //$NON-NLS-1$
        {
            iVal = SwingConstants.TOP;
        } else if ("LEFT".equals(aString)) //$NON-NLS-1$
        {
            iVal = SwingConstants.LEFT;
        } else if ("BOTTOM".equals(aString)) //$NON-NLS-1$
        {
            iVal = SwingConstants.BOTTOM;
        } else if ("RIGHT".equals(aString)) //$NON-NLS-1$
        {
            iVal = SwingConstants.RIGHT;
        } else {
            iVal = defaultValue;
        }
    }

    return iVal;
}

From source file:pcgen.core.SettingsHandler.java

private static String convertTabPlacementToString(final int placement) {
    switch (placement) {
    case SwingConstants.BOTTOM:
        return "BOTTOM"; //$NON-NLS-1$

    case SwingConstants.LEFT:
        return "LEFT"; //$NON-NLS-1$

    case SwingConstants.RIGHT:
        return "RIGHT"; //$NON-NLS-1$

    case SwingConstants.TOP:
    default:/*from  w w w  . ja v  a2 s.  c om*/
        return "TOP"; //$NON-NLS-1$
    }
}

From source file:pcgen.gui2.CharacterTabs.java

private void initComponents() {
    CharacterManager.getCharacters().addListListener(this);
    frame.getSelectedCharacterRef().addReferenceListener(this);

    setTabPlacement(SwingConstants.BOTTOM);
    addChangeListener(this);
    setSharedComponent(infoTabbedPane);//from www .  j  a va2 s . c o m
    //Initialize popup menu
    PCGenActionMap actions = frame.getActionMap();
    popupMenu.add(actions.get(PCGenActionMap.NEW_COMMAND));
    popupMenu.add(actions.get(PCGenActionMap.CLOSE_COMMAND));
    popupMenu.add(actions.get(PCGenActionMap.SAVE_COMMAND));
    popupMenu.add(actions.get(PCGenActionMap.SAVEAS_COMMAND));
    addMouseListener(new PopupListener());
}

From source file:ro.nextreports.engine.exporter.ResultExporter.java

private void buildCellVAllign(Map<String, Object> format, int vAllign) {
    if (SwingConstants.CENTER == vAllign) {
        format.put(StyleFormatConstants.VERTICAL_ALIGN_KEY, StyleFormatConstants.VERTICAL_ALIGN_MIDDLE);
    }/*from  w ww. java  2s  .  c om*/
    if (SwingConstants.TOP == vAllign) {
        format.put(StyleFormatConstants.VERTICAL_ALIGN_KEY, StyleFormatConstants.VERTICAL_ALIGN_TOP);
    }
    if (SwingConstants.BOTTOM == vAllign) {
        format.put(StyleFormatConstants.VERTICAL_ALIGN_KEY, StyleFormatConstants.VERTICAL_ALIGN_BOTTOM);
    }

}

From source file:se.nawroth.asciidoc.browser.AsciidocBrowserApplication.java

public AsciidocBrowserApplication(final String[] args) {
    super("Asciidoc Browser");
    setIconImage(Icons.APPLICATION.image());

    setSize(1200, 1024);/*from w  w w.j  av a 2 s .  c  om*/

    addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(final WindowEvent e) {
            actionExit();
        }
    });

    JPanel buttonPanel = new JPanel();
    backButton = new JButton("");
    backButton.setIcon(Icons.BACK.icon());
    backButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
            actionBack();
        }
    });
    buttonPanel.setLayout(new MigLayout("", "[1px][][][][]", "[1px]"));

    JButton btnOptionsbutton = new JButton("");
    btnOptionsbutton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
            settingsDialog.setVisible(true);
        }
    });
    btnOptionsbutton.setIcon(Icons.OPTIONS.icon());
    buttonPanel.add(btnOptionsbutton, "flowx,cell 0 0");
    backButton.setEnabled(false);
    buttonPanel.add(backButton, "cell 0 0,grow");
    forwardButton = new JButton("");
    forwardButton.setIcon(Icons.FORWARD.icon());
    forwardButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
            actionForward();
        }
    });
    forwardButton.setEnabled(false);
    buttonPanel.add(forwardButton, "cell 0 0,grow");
    getContentPane().setLayout(new MigLayout("", "[793.00px,grow]", "[44px][930px]"));
    getContentPane().add(buttonPanel, "cell 0 0,growx,aligny top");
    locationTextField = new JTextField(65);
    locationTextField.setText("");
    locationTextField.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(final KeyEvent e) {
            int keyCode = e.getKeyCode();
            if (keyCode == KeyEvent.VK_ENTER || keyCode == KeyEvent.VK_TAB) {
                actionGo();
                refreshDocumentTree();
            }
        }
    });
    locationTextField.setTransferHandler(
            new TextFieldTransferHandler(locationTextField.getTransferHandler(), new Runnable() {
                @Override
                public void run() {
                    locationTextField.setText("");
                }
            }, new Runnable() {

                @Override
                public void run() {
                    actionGo();
                    refreshDocumentTree();
                }
            }));

    homebutton = new JButton("");
    homebutton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
            locationTextField.setText(Settings.getHome());
            actionGo();
            refreshDocumentTree();
        }
    });

    refreshButton = new JButton("");
    refreshButton.setToolTipText("Refresh");
    refreshButton.setEnabled(false);
    refreshButton.setIcon(Icons.REFRESH.icon());
    refreshButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
            actionGo();
            refreshPreview();
        }
    });
    buttonPanel.add(refreshButton, "cell 1 0");

    homebutton.setIcon(Icons.HOME.icon());
    buttonPanel.add(homebutton, "cell 2 0");
    buttonPanel.add(locationTextField, "cell 3 0,grow");

    treeSourceSplitPane = new JSplitPane();
    treeSourceSplitPane.setResizeWeight(0.3);
    getContentPane().add(treeSourceSplitPane, "cell 0 1,grow");

    treeScrollPane = new JScrollPane();
    treeScrollPane.setMinimumSize(new Dimension(200, 200));
    treeSourceSplitPane.setLeftComponent(treeScrollPane);

    documentTree = new DocumentTree(documentModel);
    documentTree.setCellRenderer(new TooltipsTreeCellRenderer());
    ToolTipManager.sharedInstance().registerComponent(documentTree);
    ToolTipManager.sharedInstance().setInitialDelay(INITIAL_TOOLTIP_DELAY);
    ToolTipManager.sharedInstance().setReshowDelay(0);
    documentTree.addTreeSelectionListener(new TreeSelectionListener() {
        @Override
        public void valueChanged(final TreeSelectionEvent tse) {
            TreePath newLeadSelectionPath = tse.getNewLeadSelectionPath();
            if (newLeadSelectionPath != null && !newLeadSelectionPath.equals(currentSelectionPath)) {
                DefaultMutableTreeNode node = (DefaultMutableTreeNode) newLeadSelectionPath
                        .getLastPathComponent();
                FileWrapper file = (FileWrapper) node.getUserObject();
                showFile(file, true);
                refreshPreview();
            }
        }
    });
    treeScrollPane.setViewportView(documentTree);

    sourceEditorPane = new JEditorPane();
    sourceEditorPane.setContentType("text/html");
    sourceEditorPane.setEditable(false);
    sourceEditorPane.addHyperlinkListener(new HandleHyperlinkUpdate());
    JScrollPane fileScrollPane = new JScrollPane(sourceEditorPane);
    fileScrollPane.setMinimumSize(new Dimension(600, 600));

    documentTabbedPane = new JTabbedPane(SwingConstants.BOTTOM);
    documentTabbedPane.addChangeListener(new ChangeListener() {
        @Override
        public void stateChanged(final ChangeEvent ce) {
            refreshPreview();
        }
    });
    sourceLogSplitPane = new JSplitPane();
    sourceLogSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    treeSourceSplitPane.setRightComponent(sourceLogSplitPane);
    sourceLogSplitPane.setTopComponent(documentTabbedPane);
    documentTabbedPane.add(fileScrollPane);
    documentTabbedPane.setTitleAt(0, "Source");

    browserPane = new BrowserPane();

    previewScrollPane = new JScrollPane(browserPane);
    documentTabbedPane.addTab("Preview", null, previewScrollPane, null);

    console = new JConsole();
    System.setErr(console.getErr());
    System.setOut(console.getOut());
    sourceLogSplitPane.setBottomComponent(console);

    executor = new AsciidocExecutor();
}

From source file:Store.HealthSMS.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//  w  ww . java  2s  .  c om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jToolBar1 = new javax.swing.JToolBar();
    jButton2 = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    txt_msg = new javax.swing.JTextArea();
    jLabel2 = new javax.swing.JLabel();
    Send = new javax.swing.JButton();
    clr = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    spno = new javax.swing.JTextField();
    txt_no = new javax.swing.JTextField();
    src_btn = new javax.swing.JButton();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenuItem1 = new javax.swing.JMenuItem();
    hdate = new javax.swing.JMenu();
    htime = new javax.swing.JMenu();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("SEND SMS TO PATIENTS");
    setBackground(new java.awt.Color(0, 153, 51));
    setFont(new java.awt.Font("Agency FB", 1, 10)); // NOI18N
    setResizable(false);

    jToolBar1.setRollover(true);

    jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/lightbox-prev.png"))); // NOI18N
    jButton2.setToolTipText("Back");
    jButton2.setFocusable(false);
    jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton2);

    jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N
    jButton1.setToolTipText("Log Out");
    jButton1.setFocusable(false);
    jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton1);

    txt_msg.setColumns(20);
    txt_msg.setRows(5);
    txt_msg.setText("Type The Message...");
    txt_msg.setToolTipText("Type The Message...");
    txt_msg.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            txt_msgMouseClicked(evt);
        }
    });
    jScrollPane1.setViewportView(txt_msg);

    jLabel2.setText("Message");

    Send.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/messages-icon2.png"))); // NOI18N
    Send.setText("Send");
    Send.setToolTipText("Send SMS to Patients");
    Send.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            SendActionPerformed(evt);
        }
    });

    clr.setText("Clear");
    clr.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clrActionPerformed(evt);
        }
    });

    jLabel1.setText("Phone Number");

    spno.setEditable(false);
    spno.setToolTipText("Enter The Phone Number,start +254...");
    spno.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            spnoMouseClicked(evt);
        }
    });
    spno.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyTyped(java.awt.event.KeyEvent evt) {
            spnoKeyTyped(evt);
        }
    });

    txt_no.setText("Enter Patient's Admittion Number to Search");

    src_btn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/search-icon.png"))); // NOI18N
    src_btn.setText("Search");
    src_btn.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            src_btnActionPerformed(evt);
        }
    });

    jMenu1.setText("File");
    jMenu1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenu1ActionPerformed(evt);
        }
    });

    jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N
    jMenuItem1.setText("Log Out");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    jMenu1.add(jMenuItem1);

    jMenuBar1.add(jMenu1);

    hdate.setText("Date");
    jMenuBar1.add(hdate);

    htime.setText("Time");
    jMenuBar1.add(htime);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGroup(layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                    layout.createSequentialGroup().addGap(115, 115, 115).addComponent(jLabel1))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    layout.createSequentialGroup().addContainerGap().addComponent(jLabel2,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 63,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 497,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(layout.createSequentialGroup().addGap(35, 35, 35).addComponent(
                                            jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 207,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(layout.createSequentialGroup().addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    false)
                                            .addComponent(txt_no, javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(spno, javax.swing.GroupLayout.Alignment.LEADING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE))
                                            .addGap(30, 30, 30).addComponent(src_btn))))
                    .addGroup(layout.createSequentialGroup().addGap(272, 272, 272).addComponent(Send)
                            .addGap(43, 43, 43).addComponent(clr)))
                    .addContainerGap(154, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 37,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(src_btn, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txt_no, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(spno, javax.swing.GroupLayout.PREFERRED_SIZE, 38,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(32, 32, 32)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    232, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 27,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(18, 18, 18)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(clr, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(Send)))
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 28,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)));

    setSize(new java.awt.Dimension(870, 630));
    setLocationRelativeTo(null);
}

From source file:Store.SendToDocs.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//from   ww w  .j ava  2  s  . co  m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jToolBar1 = new javax.swing.JToolBar();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    d_no = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    d_txt = new javax.swing.JTextArea();
    dsend = new javax.swing.JButton();
    dclr = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    txt_dssrc = new javax.swing.JTextField();
    dsrc = new javax.swing.JButton();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenuItem1 = new javax.swing.JMenuItem();
    sdate = new javax.swing.JMenu();
    stime = new javax.swing.JMenu();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setResizable(false);

    jToolBar1.setRollover(true);

    jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/lightbox-prev.png"))); // NOI18N
    jButton1.setToolTipText("Back");
    jButton1.setFocusable(false);
    jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton1);

    jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N
    jButton2.setToolTipText("LOg Out");
    jButton2.setFocusable(false);
    jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton2);

    jLabel1.setText("Message");

    d_no.setEditable(false);
    d_no.setToolTipText("Enter Phone Number,Start +254...");
    d_no.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            d_noMouseClicked(evt);
        }
    });
    d_no.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyTyped(java.awt.event.KeyEvent evt) {
            d_noKeyTyped(evt);
        }
    });

    d_txt.setColumns(20);
    d_txt.setRows(5);
    d_txt.setText("Type Your Message...");
    d_txt.setToolTipText("Enter Phone Number,Start +254..");
    d_txt.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            d_txtMouseClicked(evt);
        }
    });
    jScrollPane1.setViewportView(d_txt);

    dsend.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/messages-icon2.png"))); // NOI18N
    dsend.setText("Send");
    dsend.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            dsendActionPerformed(evt);
        }
    });

    dclr.setText("Clear");
    dclr.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            dclrActionPerformed(evt);
        }
    });

    jLabel2.setText("Phone Number");

    txt_dssrc.setText("Enter Doctor's Number To Search");

    dsrc.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/search-icon.png"))); // NOI18N
    dsrc.setText("Search");
    dsrc.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            dsrcActionPerformed(evt);
        }
    });

    jMenu1.setText("File");

    jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N
    jMenuItem1.setText("Log Out");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    jMenu1.add(jMenuItem1);

    jMenuBar1.add(jMenu1);

    sdate.setText("Date");
    jMenuBar1.add(sdate);

    stime.setText("Time");
    jMenuBar1.add(stime);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addGap(195, 195, 195)
                                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 142,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup().addGap(325, 325, 325).addComponent(dsend)
                                    .addPreferredGap(
                                            javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(dclr))
                            .addGroup(layout.createSequentialGroup().addGroup(layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup().addGap(135, 135, 135)
                                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 66,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18))
                                    .addGroup(
                                            javax.swing.GroupLayout.Alignment.TRAILING,
                                            layout.createSequentialGroup().addContainerGap()
                                                    .addComponent(jLabel2).addGap(32, 32, 32)))
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addGroup(layout.createSequentialGroup().addGroup(layout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                    .addComponent(txt_dssrc,
                                                            javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(d_no,
                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE, 275,
                                                            Short.MAX_VALUE))
                                                    .addGap(40, 40, 40).addComponent(dsrc))
                                            .addComponent(jScrollPane1))))
                    .addContainerGap(186, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(dsrc, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txt_dssrc))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(d_no, javax.swing.GroupLayout.PREFERRED_SIZE, 29,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2))
                    .addGap(27, 27, 27)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 196,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 26,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(dsend).addComponent(dclr))
                    .addGap(69, 69, 69)));

    setSize(new java.awt.Dimension(829, 535));
    setLocationRelativeTo(null);
}