-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…and Cleanup hierarchy of components
- Loading branch information
1 parent
2fdf747
commit 0c7ea74
Showing
83 changed files
with
830 additions
and
548 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
4 changes: 2 additions & 2 deletions
4
addon/src/main/scala/org/vaadin/addons/rinne/VAccordion.scala
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,6 +1,6 @@ | ||
package org.vaadin.addons.rinne | ||
|
||
import com.vaadin.ui.Accordion | ||
import org.vaadin.addons.rinne.mixins.TabSheetMixin | ||
import org.vaadin.addons.rinne.mixins._ | ||
|
||
class VAccordion extends Accordion with TabSheetMixin | ||
class VAccordion extends Accordion with TabSheetMixin |
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,8 +1,6 @@ | ||
package org.vaadin.addons.rinne | ||
|
||
import com.vaadin.ui.Audio | ||
import org.vaadin.addons.rinne.mixins.AbstractMediaMixin | ||
import org.vaadin.addons.rinne.mixins.{ComponentMixin, AbstractComponentMixin, AbstractMediaMixin} | ||
|
||
class VAudio extends Audio with AbstractMediaMixin { | ||
|
||
} | ||
class VAudio extends Audio with AbstractMediaMixin |
2 changes: 1 addition & 1 deletion
2
addon/src/main/scala/org/vaadin/addons/rinne/VBrowserFrame.scala
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,6 +1,6 @@ | ||
package org.vaadin.addons.rinne | ||
|
||
import com.vaadin.ui.BrowserFrame | ||
import org.vaadin.addons.rinne.mixins.AbstractEmbeddedMixin | ||
import org.vaadin.addons.rinne.mixins.{ComponentMixin, AbstractComponentMixin, AbstractEmbeddedMixin} | ||
|
||
class VBrowserFrame extends BrowserFrame with AbstractEmbeddedMixin |
52 changes: 2 additions & 50 deletions
52
addon/src/main/scala/org/vaadin/addons/rinne/VButton.scala
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,54 +1,6 @@ | ||
package org.vaadin.addons.rinne | ||
|
||
import com.vaadin.ui.Button | ||
import org.vaadin.addons.rinne.events._ | ||
import org.vaadin.addons.rinne.mixins.{AbstractComponentMixin, FocusableMixin} | ||
import org.vaadin.addons.rinne.mixins._ | ||
|
||
import scala.collection.JavaConverters._ | ||
|
||
class VButton extends Button with AbstractComponentMixin with BlurNotifier with FocusNotifier with FocusableMixin { | ||
|
||
lazy val clickListeners: ListenersSet[Button.ClickEvent => Unit] = | ||
new ListenersTrait[Button.ClickEvent, ButtonClickListener] { | ||
override def listeners = getListeners(classOf[Button.ClickEvent]) | ||
|
||
override def addListener(elem: Button.ClickEvent => Unit) = addClickListener(new ButtonClickListener(elem)) | ||
|
||
override def removeListener(elem: ButtonClickListener) = removeClickListener(elem) | ||
|
||
override def clear(): Unit = { | ||
super.clear() | ||
listeners.asScala.foreach(_ => removeListener(_)) | ||
} | ||
} | ||
private var _clickKeyShortcut: Option[KeyShortcut] = None | ||
|
||
def clickKeyShortcut_=(clickShortcut: Option[KeyShortcut]) { | ||
_clickKeyShortcut = clickShortcut | ||
clickShortcut match { | ||
case None => removeClickShortcut() | ||
case Some(shortcut) => setClickShortcut(shortcut.keyCode.value, shortcut.modifiers.map(_.value): _*) | ||
} | ||
} | ||
|
||
def disableOnClick: Boolean = isDisableOnClick | ||
|
||
def disableOnClick_=(disableOnClick: Boolean) { | ||
setDisableOnClick(disableOnClick) | ||
} | ||
|
||
def clickKeyShortcut: Option[KeyShortcut] = _clickKeyShortcut | ||
|
||
def htmlContentAllowed: Boolean = isHtmlContentAllowed | ||
|
||
def htmlContentAllowed_=(htmlContentAllowed: Boolean) { | ||
setHtmlContentAllowed(htmlContentAllowed) | ||
} | ||
|
||
|
||
def clickKeyShortcut_=(clickShortcut: KeyShortcut) { | ||
this.clickKeyShortcut = Option(clickShortcut) | ||
} | ||
|
||
|
||
} | ||
class VButton extends Button with ButtonMixin |
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package org.vaadin.addons.rinne | ||
|
||
import com.vaadin.event.FieldEvents.{BlurNotifier, FocusNotifier} | ||
import com.vaadin.ui.CheckBox | ||
import org.vaadin.addons.rinne.mixins.AbstractFieldMixin | ||
import org.vaadin.addons.rinne.mixins.{AbstractFieldMixin, BlurNotifierMixin, FocusNotifierMixin} | ||
|
||
class VCheckBox extends CheckBox with AbstractFieldMixin[java.lang.Boolean] { | ||
class VCheckBox extends CheckBox | ||
with AbstractFieldMixin[java.lang.Boolean] with BlurNotifierMixin with BlurNotifier with FocusNotifierMixin with FocusNotifier { | ||
|
||
def value_=(value: Boolean) { | ||
def value_=(value: Boolean): Unit = { | ||
setValue(value) | ||
} | ||
|
||
def boolValue: Boolean = getValue | ||
|
||
} |
19 changes: 18 additions & 1 deletion
19
addon/src/main/scala/org/vaadin/addons/rinne/VColorPicker.scala
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,6 +1,23 @@ | ||
package org.vaadin.addons.rinne | ||
|
||
import java.util | ||
|
||
import com.vaadin.ui.ColorPicker | ||
import com.vaadin.ui.components.colorpicker.{ColorChangeEvent, ColorChangeListener} | ||
import org.vaadin.addons.rinne.events.ListenersSet | ||
import org.vaadin.addons.rinne.mixins.AbstractComponentMixin | ||
|
||
class VColorPicker extends ColorPicker with AbstractComponentMixin | ||
class VColorPicker extends ColorPicker with AbstractComponentMixin { | ||
|
||
lazy val colorChangeListeners = new ListenersSet[ColorChangeEvent, ColorChangeListener] { | ||
override protected def addListener(listener: ListenerLambda): Unit = addColorChangeListener( | ||
new Listener(listener) with ColorChangeListener { | ||
override def colorChanged(event: ColorChangeEvent): Unit = listener(event) | ||
} | ||
) | ||
|
||
override protected def removeListener(listener: ColorChangeListener): Unit = removeColorChangeListener(listener) | ||
|
||
override protected def listeners: util.Collection[_] = getListeners(classOf[ColorChangeEvent]) | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package org.vaadin.addons.rinne | ||
|
||
import com.vaadin.ui.DateField | ||
import org.vaadin.addons.rinne.mixins.DateFieldMixin | ||
|
||
class VDateField extends DateFieldMixin | ||
class VDateField extends DateField with DateFieldMixin |
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
Oops, something went wrong.