#  (C) Copyright 2010-2020 Enthought, Inc., Austin, TX
#  All rights reserved.

from pyface.tasks.api import TraitsDockPane
from traits.api import Instance
from traitsui.api import VGroup, View, UItem

from force_wfmanager.model.analysis_model import AnalysisModel
from force_wfmanager.ui.review.results_table import ResultsTable


class ResultsPane(TraitsDockPane):
    """ A TraitsDockPane which displays a ResultsTable in the UI."""

    # -------------------
    # Required Attributes
    # -------------------

    #: The analysis model containing the review
    analysis_model = Instance(AnalysisModel)

    # ------------------
    # Regular Attributes
    # ------------------

    #: An internal identifier for this pane
    id = "force_wfmanager.results_pane"

    #: Name displayed as the title of this pane
    name = "Results Table"

    #: Remove the possibility to close the pane
    closable = False

    #: Remove the possibility to detach the pane from the GUI
    floatable = False

    #: Remove the possibility to move the pane in the GUI
    movable = True

    #: Make the pane visible by default
    visible = True

    # --------------------
    # Dependent Attributes
    # --------------------

    #: The table displaying the review.
    #: Listens to: :attr:`analysis_model`
    results_table = Instance(ResultsTable)

    # ----
    # View
    # ----

    traits_view = View(VGroup(UItem("results_table", style="custom")))

    # Defaults

    def _results_table_default(self):
        return ResultsTable(analysis_model=self.analysis_model)

78e2e9e1e836bc781772395107c71ec6b4c34dc0
<mask token>


class ResultsPane(TraitsDockPane):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def _results_table_default(self):
        return ResultsTable(analysis_model=self.analysis_model)

<mask token>


class ResultsPane(TraitsDockPane):
    <mask token>
    analysis_model = Instance(AnalysisModel)
    id = 'force_wfmanager.results_pane'
    name = 'Results Table'
    closable = False
    floatable = False
    movable = True
    visible = True
    results_table = Instance(ResultsTable)
    traits_view = View(VGroup(UItem('results_table', style='custom')))

    def _results_table_default(self):
        return ResultsTable(analysis_model=self.analysis_model)

<mask token>


class ResultsPane(TraitsDockPane):
    """ A TraitsDockPane which displays a ResultsTable in the UI."""
    analysis_model = Instance(AnalysisModel)
    id = 'force_wfmanager.results_pane'
    name = 'Results Table'
    closable = False
    floatable = False
    movable = True
    visible = True
    results_table = Instance(ResultsTable)
    traits_view = View(VGroup(UItem('results_table', style='custom')))

    def _results_table_default(self):
        return ResultsTable(analysis_model=self.analysis_model)

from pyface.tasks.api import TraitsDockPane
from traits.api import Instance
from traitsui.api import VGroup, View, UItem
from force_wfmanager.model.analysis_model import AnalysisModel
from force_wfmanager.ui.review.results_table import ResultsTable


class ResultsPane(TraitsDockPane):
    """ A TraitsDockPane which displays a ResultsTable in the UI."""
    analysis_model = Instance(AnalysisModel)
    id = 'force_wfmanager.results_pane'
    name = 'Results Table'
    closable = False
    floatable = False
    movable = True
    visible = True
    results_table = Instance(ResultsTable)
    traits_view = View(VGroup(UItem('results_table', style='custom')))

    def _results_table_default(self):
        return ResultsTable(analysis_model=self.analysis_model)

#  (C) Copyright 2010-2020 Enthought, Inc., Austin, TX
#  All rights reserved.

from pyface.tasks.api import TraitsDockPane
from traits.api import Instance
from traitsui.api import VGroup, View, UItem

from force_wfmanager.model.analysis_model import AnalysisModel
from force_wfmanager.ui.review.results_table import ResultsTable


class ResultsPane(TraitsDockPane):
    """ A TraitsDockPane which displays a ResultsTable in the UI."""

    # -------------------
    # Required Attributes
    # -------------------

    #: The analysis model containing the review
    analysis_model = Instance(AnalysisModel)

    # ------------------
    # Regular Attributes
    # ------------------

    #: An internal identifier for this pane
    id = "force_wfmanager.results_pane"

    #: Name displayed as the title of this pane
    name = "Results Table"

    #: Remove the possibility to close the pane
    closable = False

    #: Remove the possibility to detach the pane from the GUI
    floatable = False

    #: Remove the possibility to move the pane in the GUI
    movable = True

    #: Make the pane visible by default
    visible = True

    # --------------------
    # Dependent Attributes
    # --------------------

    #: The table displaying the review.
    #: Listens to: :attr:`analysis_model`
    results_table = Instance(ResultsTable)

    # ----
    # View
    # ----

    traits_view = View(VGroup(UItem("results_table", style="custom")))

    # Defaults

    def _results_table_default(self):
        return ResultsTable(analysis_model=self.analysis_model)
