wip on browse host
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
package com.muwire.core.search
|
package com.muwire.core.search
|
||||||
|
|
||||||
|
import com.muwire.core.Event
|
||||||
import com.muwire.core.Persona
|
import com.muwire.core.Persona
|
||||||
|
|
||||||
class UIBrowseEvent {
|
class UIBrowseEvent extends Event {
|
||||||
Persona host
|
Persona host
|
||||||
}
|
}
|
||||||
|
@@ -8,6 +8,7 @@ import javax.annotation.Nonnull
|
|||||||
|
|
||||||
import com.muwire.core.EventBus
|
import com.muwire.core.EventBus
|
||||||
import com.muwire.core.search.BrowseStatusEvent
|
import com.muwire.core.search.BrowseStatusEvent
|
||||||
|
import com.muwire.core.search.UIBrowseEvent
|
||||||
import com.muwire.core.search.UIResultEvent
|
import com.muwire.core.search.UIResultEvent
|
||||||
|
|
||||||
@ArtifactProviderFor(GriffonController)
|
@ArtifactProviderFor(GriffonController)
|
||||||
@@ -20,9 +21,10 @@ class BrowseController {
|
|||||||
EventBus eventBus
|
EventBus eventBus
|
||||||
|
|
||||||
|
|
||||||
void mvcGroupInit(Map<String,String> args) {
|
void register() {
|
||||||
eventBus.register(BrowseStatusEvent.class, this)
|
eventBus.register(BrowseStatusEvent.class, this)
|
||||||
eventBus.register(UIResultEvent.class, this)
|
eventBus.register(UIResultEvent.class, this)
|
||||||
|
eventBus.publish(new UIBrowseEvent(host : model.host))
|
||||||
}
|
}
|
||||||
|
|
||||||
void mvcGroupDestroy() {
|
void mvcGroupDestroy() {
|
||||||
|
@@ -5,6 +5,8 @@ import griffon.inject.MVCMember
|
|||||||
import griffon.metadata.ArtifactProviderFor
|
import griffon.metadata.ArtifactProviderFor
|
||||||
|
|
||||||
import javax.swing.JDialog
|
import javax.swing.JDialog
|
||||||
|
import javax.swing.JLabel
|
||||||
|
import javax.swing.ListSelectionModel
|
||||||
import javax.swing.SwingConstants
|
import javax.swing.SwingConstants
|
||||||
import javax.swing.table.DefaultTableCellRenderer
|
import javax.swing.table.DefaultTableCellRenderer
|
||||||
|
|
||||||
@@ -20,6 +22,8 @@ class BrowseView {
|
|||||||
FactoryBuilderSupport builder
|
FactoryBuilderSupport builder
|
||||||
@MVCMember @Nonnull
|
@MVCMember @Nonnull
|
||||||
BrowseModel model
|
BrowseModel model
|
||||||
|
@MVCMember @Nonnull
|
||||||
|
BrowseController controller
|
||||||
|
|
||||||
def mainFrame
|
def mainFrame
|
||||||
def dialog
|
def dialog
|
||||||
@@ -93,6 +97,8 @@ class BrowseView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mvcGroupInit(Map<String,String> args) {
|
void mvcGroupInit(Map<String,String> args) {
|
||||||
|
controller.register()
|
||||||
|
|
||||||
dialog.getContentPane().add(p)
|
dialog.getContentPane().add(p)
|
||||||
dialog.pack()
|
dialog.pack()
|
||||||
dialog.setLocationRelativeTo(mainFrame)
|
dialog.setLocationRelativeTo(mainFrame)
|
||||||
|
Reference in New Issue
Block a user