Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
tauquir authored and tauquir committed Aug 29, 2017
1 parent 800a3f3 commit 5a32739
Show file tree
Hide file tree
Showing 15 changed files with 997 additions and 32 deletions.
58 changes: 32 additions & 26 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
## [<ins>1.1.0 (15-08-2017)</ins>](https://github.com/tauquirahmed93/palette4bootstrap/releases/tag/v1.1.0)
#### Added the following palette items
* **Bootstrap Typography**
* More
* **Bootstrap Media**
* Image
* Glyphicons
* Font Awesome Icons
* Ionicons
* Carousel
* Google Maps

## [<ins>1.0.0 (02-08-2017)</ins>](https://github.com/tauquirahmed93/palette4bootstrap/releases/tag/v1.0.0)
### Initial Commit
#### Following palette items are available
* **Bootstrap UI**
* Blank Page
* **Bootstrap Grid**
* Row
* Column
* Clearfix
* **Bootstrap Typography**
* Heading
* Paragraph
* Alert
* Blockquote
## [<ins>1.2.0 (28-08-2017)</ins>](https://github.com/tahmed1994/palette4bootstrap/releases/tag/v1.2.0)
#### Added the following palette items
* **Bootstrap Containers** (NEW)
* Container
* Panel

## [<ins>1.1.0 (15-08-2017)</ins>](https://github.com/tahmed1994/palette4bootstrap/releases/tag/v1.1.0)
#### Added the following palette items
* **Bootstrap Typography**
* More
* **Bootstrap Media**
* Image
* Glyphicons
* Font Awesome Icons
* Ionicons
* Carousel
* Google Maps

## [<ins>1.0.0 (02-08-2017)</ins>](https://github.com/tahmed1994/palette4bootstrap/releases/tag/v1.0.0)
### Initial Commit
#### Following palette items are available
* **Bootstrap UI**
* Blank Page
* **Bootstrap Grid**
* Row
* Column
* Clearfix
* **Bootstrap Typography**
* Heading
* Paragraph
* Alert
* Blockquote
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ This is a module for the [NetBeans IDE](http://netbeans.org/) which adds new pal
* Ionicons
* Carousel
* Google Maps
* **Bootstrap Containers**
* Container
* Panel

-And many more to come soon.

## Authors

* **Tauquir Ahmed** - *Initial work* - [tauquirahmed93](https://github.com/tauquirahmed93)
* **Tauquir Ahmed** - *Initial work* - [tahmed1994](https://github.com/tahmed1994)

## License

Expand Down
2 changes: 1 addition & 1 deletion manifest.mf
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: true
OpenIDE-Module: org.tauquir.palette4bootstrap
OpenIDE-Module-Layer: org/tauquir/palette4bootstrap/layer.xml
OpenIDE-Module-Localizing-Bundle: org/tauquir/palette4bootstrap/items/Bundle.properties
OpenIDE-Module-Specification-Version: 1.1.0
OpenIDE-Module-Specification-Version: 1.2.0

2 changes: 1 addition & 1 deletion nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbpr
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
license.file=LICENSE
nbm.homepage=https://github.com/tauquirahmed93/palette4bootstrap
nbm.homepage=https://github.com/tahmed1994/palette4bootstrap
nbm.module.author=Tauquir Ahmed
28 changes: 28 additions & 0 deletions src/org/tauquir/palette4bootstrap/items/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,28 @@ Create other typography related elements like &lt;small&gt;,<br>\
&lt;strong&gt;, &lt;em&gt;, &lt;mark&gt;, &lt;span&gt;, etc<br>\
</html>

# Strings for Container
CONTAINERS.CONTAINER.NAME=Container
CONTAINERS.CONTAINER.HINT=\
<html>\
Bootstrap requires a containing element to wrap site contents and house the grid system.<br>\
You may choose one of two containers to use in your projects<br>\
<ol>\
<li>Use <em>.container</em> for a responsive fixed width container.</li>\
<li>Use <em>.container-fluid</em> for a full width container, spanning the entire width of your viewport.</li>\
</ol><br>\
Note that, due to padding and more, neither container is nestable.<br>\
</html>

# Strings for Container
CONTAINERS.PANEL.NAME=Panel
CONTAINERS.PANEL.HINT=\
<html>\
This is the Bootstrap Panel Component<br>\
Use it to display content inside a customizable<br>\
box which may contain a heading, body and a footer\
</html>

# Strings for Image
MEDIA.IMAGE.NAME=Image
MEDIA.IMAGE.HINT=\
Expand Down Expand Up @@ -422,3 +444,9 @@ MapCustomizer.jLabel18.text=Type
MapCustomizer.jLabel17.text=Zoom
MapCustomizer.jLabel16.text=Coordinates
MapCustomizer.jLabel19.text=Coordinates
ContainerCustomizer.jLabel1.text=Container Type
ContainerCustomizer.jTextArea1.toolTipText=
PanelCustomizer.jLabel2.text=Panel Type
PanelCustomizer.showHeaderCheckBox.text=Show Heading
PanelCustomizer.showBodyCheckBox.text=Show Body
PanelCustomizer.showFooterCheckBox.text=Show Footer
43 changes: 43 additions & 0 deletions src/org/tauquir/palette4bootstrap/items/Container.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* palette4bootstrap - A netbeans palette plugin for the Bootstrap
* Copyright (c) 2017-2018 Tauquir Ahmed (tauquirahmed93@gmail.com)
* Licensed under the MIT License.
*/
package org.tauquir.palette4bootstrap.items;

import javax.swing.text.BadLocationException;
import javax.swing.text.JTextComponent;
import org.openide.text.ActiveEditorDrop;
import org.tauquir.palette4bootstrap.bsPaletteUtilities;

public class Container implements ActiveEditorDrop {
private boolean isFluid = false;

public String generateBody() {
StringBuilder sb = new StringBuilder();
sb.append("<div class=\"");
if (isFluid) sb.append("container-fluid");
else sb.append("container");
sb.append("\">\n</div>");
return sb.toString();
}

@Override
public boolean handleTransfer(JTextComponent jtc) {
ContainerCustomizer c = new ContainerCustomizer(this);
boolean accept = c.showDialog();
if (accept) {
String body = generateBody();
try {
bsPaletteUtilities.insert(body, jtc);
} catch (BadLocationException ble) {
accept = false;
}
}
return accept;
}

public void setIsFluid(boolean isFluid) {
this.isFluid = isFluid;
}
}
102 changes: 102 additions & 0 deletions src/org/tauquir/palette4bootstrap/items/ContainerCustomizer.form
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" min="-2" pref="322" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jComboBox1" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JComboBox" name="jComboBox1">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="2">
<StringItem index="0" value=".container"/>
<StringItem index="1" value=".container-fluid"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="jComboBox1ItemStateChanged"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/tauquir/palette4bootstrap/items/Bundle.properties" key="ContainerCustomizer.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/tauquir/palette4bootstrap/items/Bundle.properties" key="Customizer.GeneratedCode" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextArea" name="jTextArea1">
<Properties>
<Property name="columns" type="int" value="20"/>
<Property name="rows" type="int" value="5"/>
<Property name="text" type="java.lang.String" value="&lt;div class=&quot;container&quot;&gt;&#xa;&lt;/div&gt;" noResource="true"/>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/tauquir/palette4bootstrap/items/Bundle.properties" key="ContainerCustomizer.jTextArea1.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>
Loading

0 comments on commit 5a32739

Please sign in to comment.