-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tauquir
authored and
tauquir
committed
Aug 29, 2017
1 parent
800a3f3
commit 5a32739
Showing
15 changed files
with
997 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
102
src/org/tauquir/palette4bootstrap/items/ContainerCustomizer.form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="<String>"/> | ||
</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, "{key}")"/> | ||
</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, "{key}")"/> | ||
</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="<div class="container">
</div>" 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, "{key}")"/> | ||
</Property> | ||
</Properties> | ||
</Component> | ||
</SubComponents> | ||
</Container> | ||
</SubComponents> | ||
</Form> |
Oops, something went wrong.